| 265 | } |
| 266 | |
| 267 | void packet_fwrite_fmt(FILE *fh, const char *fmt, ...) |
| 268 | { |
| 269 | static struct strbuf buf = STRBUF_INIT; |
| 270 | va_list args; |
| 271 | |
| 272 | strbuf_reset(&buf); |
| 273 | |
| 274 | va_start(args, fmt); |
| 275 | format_packet(&buf, "", fmt, args); |
| 276 | va_end(args); |
| 277 | |
| 278 | fwrite_or_die(fh, buf.buf, buf.len); |
| 279 | } |
| 280 | |
| 281 | void packet_fflush(FILE *f) |
| 282 | { |
no test coverage detected