From c147da0d28ac26e238ece82893168a34a1c6a103 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Mon, 1 Oct 2007 11:28:32 -0700 Subject: [PATCH] Unspecified files are null strings, not null pointers We use empty strings, not null pointers, for unspecified files, so there is no need to compare them for nullness. --- nasm.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/nasm.c b/nasm.c index 559749a6..7a4ac550 100644 --- a/nasm.c +++ b/nasm.c @@ -783,13 +783,11 @@ static void parse_cmdline(int argc, char **argv) /* Look for basic command line typos. This definitely doesn't catch all errors, but it might help cases of fumbled fingers. */ - if ((errname && !strcmp(inname, errname)) || - (outname && !strcmp(inname, outname)) || - (listname && !strcmp(inname, listname))) { + if (!strcmp(inname, errname) || !strcmp(inname, outname) || + !strcmp(inname, listname)) report_error(ERR_FATAL | ERR_NOFILE | ERR_USAGE, "file `%s' is both input and output file", inname); - } if (*errname) { error_file = fopen(errname, "w"); -- 2.11.4.GIT