test_append_vsprintf(struct buffer *buffer, const char *format, ...) { va_list args; va_start(args, format); buffer_append_vsprintf(buffer, format, args); va_end(args); }
/* * Replace the current buffer contents with data printed from the supplied * va_list. The new data shows up as unused data at the end of the buffer. * The trailing nul is not added to the buffer. */ void buffer_vsprintf(struct buffer *buffer, const char *format, va_list args) { buffer_set(buffer, NULL, 0); buffer_append_vsprintf(buffer, format, args); }