Tweak x*printf documentation.
authorEric Blake <ebb9@byu.net>
Mon, 22 Oct 2007 22:05:18 +0000 (16:05 -0600)
committerEric Blake <ebb9@byu.net>
Mon, 22 Oct 2007 22:11:03 +0000 (16:11 -0600)
* lib/xprintf.c (xprintf, xvprintf, xfprintf, xvfprintf): Adjust
variable name and comments.
Suggested by Bruno Haible.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
lib/xprintf.c

index c05974a..cf77f51 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-10-22  Eric Blake  <ebb9@byu.net>
+
+       Tweak x*printf documentation.
+       * lib/xprintf.c (xprintf, xvprintf, xfprintf, xvfprintf): Adjust
+       variable name and comments.
+       Suggested by Bruno Haible.
+
 2007-10-22  Bruno Haible  <bruno@clisp.org>
 
        * lib/acl.c (copy_acl): Fix file name in comment.
index 7738cc4..8f279fa 100644 (file)
 
 /* written by Jim Meyering */
 
-/* Just like printf, but call error if it fails without setting
-   the error indicator.  */
+/* Just like printf, but call error if it fails without setting the
+   stream's error indicator.  */
 int
 xprintf (char const *restrict format, ...)
 {
   va_list args;
-  int err;
+  int retval;
   va_start (args, format);
-  err = xvprintf (format, args);
+  retval = xvprintf (format, args);
   va_end (args);
 
-  return err;
+  return retval;
 }
 
-/* Just like vprintf, but call error if it fails without setting
-   the error indicator.  */
+/* Just like vprintf, but call error if it fails without setting the
+   stream's error indicator.  */
 int
 xvprintf (char const *restrict format, va_list args)
 {
-  int err = vprintf (format, args);
-  if (err < 0 && ! ferror (stdout))
+  int retval = vprintf (format, args);
+  if (retval < 0 && ! ferror (stdout))
     error (exit_failure, errno, gettext ("cannot perform formatted output"));
 
-  return err;
+  return retval;
 }
 
-/* Just like fprintf, but call error if it fails without setting
-   the error indicator.  */
+/* Just like fprintf, but call error if it fails without setting the
+   stream's error indicator.  */
 int
 xfprintf (FILE *restrict stream, char const *restrict format, ...)
 {
   va_list args;
-  int err;
+  int retval;
   va_start (args, format);
-  err = xvfprintf (stream, format, args);
+  retval = xvfprintf (stream, format, args);
   va_end (args);
 
-  return err;
+  return retval;
 }
 
-/* Just like vfprintf, but call error if it fails without setting
-   the error indicator.  */
+/* Just like vfprintf, but call error if it fails without setting the
+   stream's error indicator.  */
 int
 xvfprintf (FILE *restrict stream, char const *restrict format, va_list args)
 {
-  int err = vfprintf (stream, format, args);
-  if (err < 0 && ! ferror (stream))
+  int retval = vfprintf (stream, format, args);
+  if (retval < 0 && ! ferror (stream))
     error (exit_failure, errno, gettext ("cannot perform formatted output"));
 
-  return err;
+  return retval;
 }