| 19 | } |
| 20 | |
| 21 | int vsnprintf(char *buf, size_t size, const char *fmt, va_list args) |
| 22 | { |
| 23 | int i; |
| 24 | struct vsnprintf_context ctx; |
| 25 | |
| 26 | ctx.str_buf = buf; |
| 27 | ctx.buf_limit = size ? size - 1 : 0; |
| 28 | i = vtxprintf(str_tx_byte, fmt, args, &ctx); |
| 29 | if (size) |
| 30 | *ctx.str_buf = '\0'; |
| 31 | |
| 32 | return i; |
| 33 | } |
| 34 | |
| 35 | int snprintf(char *buf, size_t size, const char *fmt, ...) |
| 36 | { |
no test coverage detected