From: Jim Meyering Date: Sat, 27 Oct 2007 07:42:27 +0000 (+0200) Subject: Adjust format string so msgfmt doesn't object. X-Git-Tag: v6.9.89~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f05c616d241da881c7cefd1b91cd5e575e2ed15;p=thirdparty%2Fcoreutils.git 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. --- diff --git a/ChangeLog b/ChangeLog index 4377e237b5..d651afd880 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-10-27 Jim Meyering + 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. diff --git a/src/df.c b/src/df.c index 94cf330b5a..f0fdcd70ce 100644 --- 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)