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