diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-03-11 13:10:26 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-03-11 13:10:26 +0000 |
commit | f7fc5979bf8f38fd98e258799e41949fa88c75a3 (patch) | |
tree | 3dae13ec8cf412d62cf6e6f4271c62e4f009f3eb /usr.bin/mandoc/mansearch.c | |
parent | 0a0782ec1052b004211350696e5c134d929892f1 (diff) |
When interpreting the -O argument as a macro name fails,
fall back to showing Nd rather than not showing anything.
Issue reported by jmc@.
Diffstat (limited to 'usr.bin/mandoc/mansearch.c')
-rw-r--r-- | usr.bin/mandoc/mansearch.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mansearch.c b/usr.bin/mandoc/mansearch.c index 4be49ba704a..0c79dae0c00 100644 --- a/usr.bin/mandoc/mansearch.c +++ b/usr.bin/mandoc/mansearch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mansearch.c,v 1.41 2015/02/27 16:00:54 schwarze Exp $ */ +/* $OpenBSD: mansearch.c,v 1.42 2015/03/11 13:10:25 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -187,8 +187,8 @@ mansearch(const struct mansearch *search, if (NULL == (e = exprcomp(search, argc, argv))) goto out; - outbit = 0; if (NULL != search->outkey) { + outbit = TYPE_Nd; for (indexbit = 0, iterbit = 1; indexbit < mansearch_keymax; indexbit++, iterbit <<= 1) { @@ -198,7 +198,8 @@ mansearch(const struct mansearch *search, break; } } - } + } else + outbit = 0; /* * Save a descriptor to the current working directory. |