]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Don't embed `this'-style quotes in format strings.
authorJim Meyering <jim@meyering.net>
Thu, 16 Jun 2005 21:40:43 +0000 (21:40 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 16 Jun 2005 21:40:43 +0000 (21:40 +0000)
Include "quote.h".
Rather than this: error (..., "...`%s'...", arg);
do this:          error (..., "...%s...", quote (arg));

src/cat.c

index aaae901b4b25e006e472f7e8baa6ba565bf8ac22..8f1b2bfc5f135a02999dfef8fdffd36eeb1bdb3a 100644 (file)
--- a/src/cat.c
+++ b/src/cat.c
@@ -34,6 +34,7 @@
 #include "error.h"
 #include "full-write.h"
 #include "getpagesize.h"
+#include "quote.h"
 #include "safe-read.h"
 
 /* The official name of this program (e.g., no `g' prefix).  */
@@ -313,7 +314,7 @@ cat (
                    use_fionread = false;
                  else
                    {
-                     error (0, errno, _("cannot do ioctl on `%s'"), infile);
+                     error (0, errno, _("cannot do ioctl on %s"), quote (infile));
                      newlines2 = newlines;
                      return false;
                    }