mirror of
https://github.com/netwide-assembler/nasm.git
synced 2024-11-27 08:10:07 +08:00
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.
This commit is contained in:
parent
59ddd26aac
commit
c147da0d28
6
nasm.c
6
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");
|
||||
|
Loading…
Reference in New Issue
Block a user