summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-05-16 09:10:36 -0400
committerUlrich Drepper <drepper@gmail.com>2011-05-16 09:10:36 -0400
commit15cc7dd182a6be79cbb01a5de4f13e958717bd69 (patch)
tree788d84d73a4f161cb4ae7c47b05db7db2a14f4fc /misc
parentf3799213a3ee8265ba47fad33d9cff71d97ab0d4 (diff)
downloadglibc-15cc7dd182a6be79cbb01a5de4f13e958717bd69.tar.gz
Fix test for error_one_per_line mode in error
Diffstat (limited to 'misc')
-rw-r--r--misc/error.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/misc/error.c b/misc/error.c
index 85d1cffbf9..9a73a61c74 100644
--- a/misc/error.c
+++ b/misc/error.c
@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
- Copyright (C) 1990-1998, 2000-2005, 2006 Free Software Foundation, Inc.
+ Copyright (C) 1990-1998, 2000-2006, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -272,7 +272,9 @@ error_at_line (int status, int errnum, const char *file_name,
if (old_line_number == line_number
&& (file_name == old_file_name
- || strcmp (old_file_name, file_name) == 0))
+ || (old_file_name != NULL
+ && file_name != NULL
+ && strcmp (old_file_name, file_name) == 0)))
/* Simply return and print nothing. */
return;