From: solar Date: Mon, 24 Apr 2006 06:05:53 +0000 (+0000) Subject: va_end() was missing. Fixed. X-Git-Tag: v0.5~211 X-Git-Url: https://pd.if.org/git/?a=commitdiff_plain;h=8fdcadf9530faa3267f9a41375ff1760c991f027;hp=84119d374a4d8fafc25d9daf7e208837893d1774;p=pdclib va_end() was missing. Fixed. --- diff --git a/functions/stdio/fprintf.c b/functions/stdio/fprintf.c index 14318a2..45369c6 100644 --- a/functions/stdio/fprintf.c +++ b/functions/stdio/fprintf.c @@ -13,9 +13,12 @@ int fprintf( FILE * _PDCLIB_restrict stream, const char * _PDCLIB_restrict format, ... ) { + int rc; va_list ap; va_start( ap, format ); - return vfprintf( stream, format, ap ); + rc = vfprintf( stream, format, ap ); + va_end( ap ); + return rc; } #endif diff --git a/functions/stdio/fscanf.c b/functions/stdio/fscanf.c index f680076..bc5bebf 100644 --- a/functions/stdio/fscanf.c +++ b/functions/stdio/fscanf.c @@ -13,9 +13,12 @@ int fscanf( FILE * _PDCLIB_restrict stream, const char * _PDCLIB_restrict format, ... ) { + int rc; va_list ap; va_start( ap, format ); - return vfscanf( stream, format, ap ); + rc = vfscanf( stream, format, ap ); + va_end( ap ); + return rc; } #endif diff --git a/functions/stdio/printf.c b/functions/stdio/printf.c index 7088e93..ac3dfc3 100644 --- a/functions/stdio/printf.c +++ b/functions/stdio/printf.c @@ -13,9 +13,12 @@ int printf( const char * _PDCLIB_restrict format, ... ) { + int rc; va_list ap; va_start( ap, format ); - return vfprintf( stdout, format, ap ); + rc = vfprintf( stdout, format, ap ); + va_end( ap ); + return rc; } #endif diff --git a/functions/stdio/snprintf.c b/functions/stdio/snprintf.c index 3a6e706..881baef 100644 --- a/functions/stdio/snprintf.c +++ b/functions/stdio/snprintf.c @@ -13,9 +13,12 @@ int snprintf( char * _PDCLIB_restrict s, size_t n, const char * _PDCLIB_restrict format, ...) { + int rc; va_list ap; va_start( ap, format ); - return vsnprintf( s, n, format, ap ); + rc = vsnprintf( s, n, format, ap ); + va_end( ap ); + return rc; } #endif diff --git a/functions/stdio/sprintf.c b/functions/stdio/sprintf.c index 4f2e680..6f7ad75 100644 --- a/functions/stdio/sprintf.c +++ b/functions/stdio/sprintf.c @@ -14,9 +14,12 @@ int sprintf( char * _PDCLIB_restrict s, const char * _PDCLIB_restrict format, ...) { + int rc; va_list ap; va_start( ap, format ); - return vsnprintf( s, SIZE_MAX, format, ap ); + rc = vsnprintf( s, SIZE_MAX, format, ap ); + va_end( ap ); + return rc; } #endif