diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-20 09:54:48 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-20 09:54:48 +0000 |
commit | 6939ed3cf1934623e887fc392bf4bb8126dfac6f (patch) | |
tree | ede39269455f5be2443d24e4e4667d690024da33 | |
parent | 3ee436ab2a46363611bf798816b6330a09d9b68e (diff) | |
download | mandoc-6939ed3cf1934623e887fc392bf4bb8126dfac6f.tar.gz |
Fix previous: Don't let man(1) warn twice about non-existant names.
Again noticed by deraadt@.
-rw-r--r-- | main.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -352,13 +352,17 @@ main(int argc, char *argv[]) sz = 0; #endif - if (sz == 0 && search.argmode == ARG_NAME) - fs_search(&search, &conf.manpath, - argc, argv, &res, &sz); + if (sz == 0) { + if (search.argmode == ARG_NAME) + fs_search(&search, &conf.manpath, + argc, argv, &res, &sz); + else + fprintf(stderr, + "%s: nothing appropriate\n", + progname); + } if (sz == 0) { - fprintf(stderr, "%s: nothing appropriate\n", - progname); rc = MANDOCLEVEL_BADARG; goto out; } |