]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Adjust format string so msgfmt doesn't object.
authorJim Meyering <meyering@redhat.com>
Sat, 27 Oct 2007 07:42:27 +0000 (09:42 +0200)
committerJim Meyering <meyering@redhat.com>
Sat, 27 Oct 2007 07:42:27 +0000 (09:42 +0200)
* src/df.c (main): Use "%s%s" (not %smsg) to print "msg" with or
without a "Warning: " prefix.  Reported by Clytie Siddall.

ChangeLog
src/df.c

index 4377e237b55501759bb29852f4fb183f925a3038..d651afd880ee6224be27bfffae9c90952c56e227 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2007-10-27  Jim Meyering  <meyering@redhat.com>
 
+       Adjust format string so msgfmt doesn't object.
+       * src/df.c (main): Use "%s%s" (not %smsg) to print "msg" with or
+       without a "Warning: " prefix.  Reported by Clytie Siddall.
+
        Clean up tests/Makefile.am.
        * tests/Makefile.am (EXTRA_DIST): Remove $(TESTS).  No longer defined.
        (TESTS_ENVIRONMENT): Remove definition.
index 94cf330b5a577fb32a8d308bc66cbc58789316d0..f0fdcd70ce53c3b56caf5892db75cb99731d9844 100644 (file)
--- a/src/df.c
+++ b/src/df.c
@@ -938,10 +938,10 @@ main (int argc, char **argv)
       /* Couldn't read the table of mounted file systems.
         Fail if df was invoked with no file name arguments;
         Otherwise, merely give a warning and proceed.  */
+      int status =          (optind < argc ? 0 : EXIT_FAILURE);
       const char *warning = (optind < argc ? _("Warning: ") : "");
-      int status = (optind < argc ? 0 : EXIT_FAILURE);
-      error (status, errno,
-            _("%scannot read table of mounted file systems"), warning);
+      error (status, errno, "%s%s", warning,
+            _("cannot read table of mounted file systems"));
     }
 
   if (require_sync)