maint: don't emit an extra newline in each of two diagnostics
authorJim Meyering <meyering@redhat.com>
Tue, 25 May 2010 16:05:29 +0000 (18:05 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 25 May 2010 16:05:29 +0000 (18:05 +0200)
* src/shuf.c (main): Remove a stray newline in a diagnostic.
* src/od.c (main): Likewise.
Detected via these:
  git grep -A1 'error *(.*,$' | grep -C1 '\\n"[,)]'
  git grep 'error *(.*;$' | grep '\\n"[,)]'

src/od.c
src/shuf.c

index 964552d..4508725 100644 (file)
--- a/src/od.c
+++ b/src/od.c
@@ -1800,7 +1800,7 @@ it must be one character from [doxn]"),
       if (traditional && 1 < n_files)
         {
           error (0, 0, _("extra operand %s"), quote (argv[optind + 1]));
-          error (0, 0, "%s\n",
+          error (0, 0, "%s",
                  _("compatibility mode supports at most one file"));
           usage (EXIT_FAILURE);
         }
index 4f4ca1c..67b19af 100644 (file)
@@ -355,7 +355,7 @@ main (int argc, char **argv)
     {
       if (n_operands)
         {
-          error (0, 0, _("extra operand %s\n"), quote (operand[0]));
+          error (0, 0, _("extra operand %s"), quote (operand[0]));
           usage (EXIT_FAILURE);
         }
       n_lines = hi_input - lo_input + 1;