summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-11-19 11:45:40 -0800
committerH. Peter Anvin <hpa@zytor.com>2007-11-19 11:45:40 -0800
commit70c0bf22a2bee2ae7e1d5e119782df047d84965f (patch)
treed7b17316a2bd61c50e628796fc1ea4f8da020a77
parentf096968998fb1ec8bcea6b7bff51a96c56fd3eab (diff)
downloadnasm-70c0bf22a2bee2ae7e1d5e119782df047d84965f.tar.gz
BR 1834731: Remove redundant error messages for no input file
Avoid redundant error messages: ./nasm nasm: error: no input file specified nasm: fatal: file `' is both input and output file type `nasm -h' for help ... which is more than a wee bit confusing to the user.
-rw-r--r--nasm.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/nasm.c b/nasm.c
index 7cf926a5..c4e0c60a 100644
--- a/nasm.c
+++ b/nasm.c
@@ -858,13 +858,12 @@ static void parse_cmdline(int argc, char **argv)
argv += advance, argc -= advance;
}
+ /* Look for basic command line typos. This definitely doesn't
+ catch all errors, but it might help cases of fumbled fingers. */
if (!*inname)
report_error(ERR_NONFATAL | ERR_NOFILE | ERR_USAGE,
"no input file specified");
-
- /* Look for basic command line typos. This definitely doesn't
- catch all errors, but it might help cases of fumbled fingers. */
- if (!strcmp(inname, errname) || !strcmp(inname, outname) ||
+ else 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",