* misc/error.c: Add space between program name and message if file
authorEric Blake <ebb9@byu.net>
Mon, 14 Aug 2006 16:08:25 +0000 (16:08 +0000)
committerEric Blake <ebb9@byu.net>
Mon, 14 Aug 2006 16:08:25 +0000 (16:08 +0000)
name is missing.

lib/ChangeLog
lib/error.c

index 7131ebc..05131b0 100644 (file)
@@ -1,3 +1,13 @@
+2006-08-14  Eric Blake  <ebb9@byu.net>
+
+       Import the following change from libc:
+
+       2006-08-12  Ulrich Drepper  <drepper@redhat.com>
+
+       Upstream bug 2997.
+       * misc/error.c: Add space between program name and message if file
+       name is missing.
+
 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
 
        * pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
index 34e8365..d8814e0 100644 (file)
@@ -310,14 +310,13 @@ error_at_line (int status, int errnum, const char *file_name,
 #endif
     }
 
-  if (file_name != NULL)
-    {
 #if _LIBC
-      __fxprintf (NULL, "%s:%d: ", file_name, line_number);
+  __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ",
+              file_name, line_number);
 #else
-      fprintf (stderr, "%s:%d: ", file_name, line_number);
+  fprintf (stderr, file_name != NULL ? "%s:%d: " : " ",
+           file_name, line_number);
 #endif
-    }
 
   va_start (args, message);
   error_tail (status, errnum, message, args);