From 124518ae5fba9e352a9cf8a8d7c1a8160475d10b Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Tue, 14 May 2019 22:46:44 +0200 Subject: In-depth robustness. Reported by: clang static analyzer (clang-8) --- report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'report.c') diff --git a/report.c b/report.c index 5d9abb73..1466802a 100644 --- a/report.c +++ b/report.c @@ -362,7 +362,7 @@ report_at_line (FILE *errfp, errnum, file_name, line_number, message, va_alist) static unsigned int old_line_number; if (old_line_number == line_number && - (file_name == old_file_name || !strcmp (old_file_name, file_name))) + (file_name == old_file_name || (old_file_name != NULL && 0 == strcmp (old_file_name, file_name)))) /* Simply return and print nothing. */ return; -- cgit v1.2.3