THIS is one of the main reasons I now **!@$!# HATE $#$@$!** programming in C.
You can't pass varargs along to another function, but you CAN pass a va_list along, provided the called function doesn't muck with it. So, you could create TWO interfaces that both call a third function that expects to get a va_list, if you needed two interfaces.
int mysql_safe_query( const char * fmt, ... )
char *buf = NULL;
int rv = 0;
buf = str_dup( fmt );
va_start( args, fmt );
rv = mysql_private_query( fmt, args );
va_end( args );
STRFREE( buf );
int mysql_private_query( char * fmt, va_list args )
char buf[MSL * 4];
/* Now, in here you don't do va_start or va_end, that's already done by the caller */
vsnprintf( buf, MSL * 4, fmt, args );
/* and do whatever you did before down here */