From: Jim Meyering Date: Sun, 7 Mar 1999 04:52:49 +0000 (+0000) Subject: (main): Use a `%s' format in error call, X-Git-Tag: FILEUTILS-4_0e~204 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c771f143db93805f89109006d908771ced2a632a;p=thirdparty%2Fcoreutils.git (main): Use a `%s' format in error call, in case the argument string contains a `%'. --- diff --git a/src/fmt.c b/src/fmt.c index 7aa9738855..d27a4d8f4a 100644 --- a/src/fmt.c +++ b/src/fmt.c @@ -397,10 +397,10 @@ main (register int argc, register char **argv) { fmt (in_stream); if (fclose (in_stream) == EOF) - error (EXIT_FAILURE, errno, file); + error (EXIT_FAILURE, errno, "%s", file); } else - error (0, errno, file); + error (0, errno, "%s", file); } } } diff --git a/src/sort.c b/src/sort.c index 69a4332a47..ee0514b769 100644 --- a/src/sort.c +++ b/src/sort.c @@ -2961,7 +2961,7 @@ but lacks following character offset")); error (SORT_FAILURE, errno, _("%s: write error"), outfile); if (have_read_stdin && fclose (stdin) == EOF) - error (SORT_FAILURE, errno, outfile); + error (SORT_FAILURE, errno, "%s", outfile); if (ferror (stdout) || fclose (stdout) == EOF) error (SORT_FAILURE, errno, _("%s: write error"), outfile);