diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-11-19 11:45:40 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-11-19 11:45:40 -0800 |
commit | 70c0bf22a2bee2ae7e1d5e119782df047d84965f (patch) | |
tree | d7b17316a2bd61c50e628796fc1ea4f8da020a77 /nasm.c | |
parent | f096968998fb1ec8bcea6b7bff51a96c56fd3eab (diff) | |
download | nasm-70c0bf22a2bee2ae7e1d5e119782df047d84965f.tar.gz nasm-70c0bf22a2bee2ae7e1d5e119782df047d84965f.tar.bz2 nasm-70c0bf22a2bee2ae7e1d5e119782df047d84965f.zip |
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.
Diffstat (limited to 'nasm.c')
-rw-r--r-- | nasm.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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", |