2001-11-01 Marcus Brinkmann <marcus@g10code.de>

* logging.c (log_printf): Do not initialize ARG_PTR with 0, we
	don't know the correct type.  Instead, run va_start and va_end
	unconditionally.
	Reported by Jose Carlos Garcia Sogo <jsogo@debian.org>.
This commit is contained in:
Marcus Brinkmann 2001-11-02 15:23:40 +00:00
parent deaea7bdec
commit 7e53360206
2 changed files with 12 additions and 10 deletions

View File

@ -1,3 +1,10 @@
2001-11-01 Marcus Brinkmann <marcus@g10code.de>
* logging.c (log_printf): Do not initialize ARG_PTR with 0, we
don't know the correct type. Instead, run va_start and va_end
unconditionally.
Reported by Jose Carlos Garcia Sogo <jsogo@debian.org>.
2001-08-30 Werner Koch <wk@gnupg.org> 2001-08-30 Werner Koch <wk@gnupg.org>
* logging.c (log_printf): Don't pass NULL instead of arg_ptr. * logging.c (log_printf): Don't pass NULL instead of arg_ptr.

View File

@ -222,18 +222,13 @@ log_debug( const char *fmt, ... )
void void
log_printf( const char *fmt, ... ) log_printf (const char *fmt, ...)
{ {
va_list arg_ptr = 0; va_list arg_ptr;
if( !fmt ) { va_start (arg_ptr, fmt);
do_logv( MY_LOG_BEGIN, NULL, arg_ptr ); do_logv (fmt ? MY_LOG_CONT : MY_LOG_BEGIN, fmt, arg_ptr);
} va_end (arg_ptr);
else {
va_start( arg_ptr, fmt ) ;
do_logv( MY_LOG_CONT, fmt, arg_ptr );
va_end(arg_ptr);
}
} }