summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-10-01 11:28:32 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-10-01 11:28:32 -0700
commitc147da0d28ac26e238ece82893168a34a1c6a103 (patch)
treef9781cac9f075079358a8bb9dd0e3eff45caae1a
parent59ddd26aac7504d49ced00cd9c8757fdc58c86f1 (diff)
downloadnasm-c147da0d28ac26e238ece82893168a34a1c6a103.tar.gz
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.
-rw-r--r--nasm.c6
1 files 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");