diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-10-01 11:28:32 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-10-01 11:28:32 -0700 |
commit | c147da0d28ac26e238ece82893168a34a1c6a103 (patch) | |
tree | f9781cac9f075079358a8bb9dd0e3eff45caae1a /nasm.c | |
parent | 59ddd26aac7504d49ced00cd9c8757fdc58c86f1 (diff) | |
download | nasm-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.
Diffstat (limited to 'nasm.c')
-rw-r--r-- | nasm.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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"); |