Passing an ellipsis to another variadic function [duplicate]
问题 This question already has an answer here: Forward an invocation of a variadic function in C 10 answers I have approximately 30 variadic functions. Each one accepts a path as the final argument, e.g.: bool do_foo(struct *f, int q, const char *fmt, ...) In each function, I have to check that the expanded format is less then or equal to a certain size. So, I find myself copy / pasting the same chunk of code to check for how many characters vsnprintf() didn't print, set errno accordingly and bail