| 324 | } |
| 325 | |
| 326 | static const char *itoa_log(int val) { |
| 327 | static CBM_TLS char bufs[PP_RING][CBM_SZ_32]; |
| 328 | static CBM_TLS int idx = 0; |
| 329 | int i = idx; |
| 330 | idx = (idx + SKIP_ONE) & PP_RING_MASK; |
| 331 | snprintf(bufs[i], sizeof(bufs[i]), "%d", val); |
| 332 | return bufs[i]; |
| 333 | } |
| 334 | |
| 335 | /* Append a JSON-escaped string value to buf at position *pos. */ |
| 336 | /* Escape one character for JSON. Returns bytes written (1 or 2). */ |
no outgoing calls
no test coverage detected