Mercurial > hg > octave-lyh > gnulib-hg
changeset 9372:091bbc680bf8
xprintf fixes.
* lib/xprintf.c (xprintf, xfprintf): Use va_end.
Use a clearer diagnostic.
Patch from Bruno Haible.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Sat, 20 Oct 2007 16:19:33 +0200 |
parents | 8b3c48038257 |
children | c8527f8ce71e |
files | ChangeLog lib/xprintf.c |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-10-20 Jim Meyering <meyering@redhat.com> + + xprintf fixes. + * lib/xprintf.c (xprintf, xfprintf): Use va_end. + Use a clearer diagnostic. + Patch from Bruno Haible. + 2007-10-20 Bruno Haible <bruno@clisp.org> * lib/vasnprintf.c (VASNPRINTF): Don't report overflow if the available
--- a/lib/xprintf.c +++ b/lib/xprintf.c @@ -38,7 +38,8 @@ va_start (args, format); int err = vprintf (format, args); if (err < 0 && ! ferror (stdout)) - error (exit_failure, errno, gettext ("write error")); + error (exit_failure, errno, gettext ("cannot perform formatted output")); + va_end (args); return err; } @@ -52,7 +53,8 @@ va_start (args, format); int err = vfprintf (stream, format, args); if (err < 0 && ! ferror (stream)) - error (exit_failure, errno, gettext ("write error")); + error (exit_failure, errno, gettext ("cannot perform formatted output")); + va_end (args); return err; }