about summary refs log tree commit diff
path: root/misc/error.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2006-08-12 17:58:16 +0000
committerUlrich Drepper <drepper@redhat.com>2006-08-12 17:58:16 +0000
commitcd8e60cead61e56e310e2c14f31052f7649ea533 (patch)
tree700bc7df70efec1d37866f391e12d6a4c0f297a6 /misc/error.c
parent9a5288841e99925426b7967ffade7c5ca5a874f4 (diff)
downloadglibc-cd8e60cead61e56e310e2c14f31052f7649ea533.tar.gz
glibc-cd8e60cead61e56e310e2c14f31052f7649ea533.tar.xz
glibc-cd8e60cead61e56e310e2c14f31052f7649ea533.zip
[BZ #2997]
2006-08-12  Ulrich Drepper  <drepper@redhat.com>
	[BZ #2997]
	* misc/error.c: Add space between program name and message if file
	name is missing.
Diffstat (limited to 'misc/error.c')
-rw-r--r--misc/error.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/misc/error.c b/misc/error.c
index 459110cf96..aca435d995 100644
--- a/misc/error.c
+++ b/misc/error.c
@@ -385,14 +385,13 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
 #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
-    }
 
 #ifdef VA_START
   VA_START (args, message);