aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-08-01 20:53:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-08-01 20:53:13 +0000
commit340b1503ec45a71e95d48a2b8d0005f53c3ef619 (patch)
tree44809890ed935515c583ea5fa68e7dfd3b504b0b /mandocdb.c
parent00a32336ba5a68c81896fde4bcdab5760ed03588 (diff)
downloadmandoc-340b1503ec45a71e95d48a2b8d0005f53c3ef619.tar.gz
mandoc-340b1503ec45a71e95d48a2b8d0005f53c3ef619.tar.zst
mandoc-340b1503ec45a71e95d48a2b8d0005f53c3ef619.zip
Repair makewhatis -t, regression in rev. 1.221 reported by naddy@.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 9a9bd828..1ccab36d 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.224 2016/07/29 15:26:37 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.225 2016/08/01 20:53:13 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2016 Ingo Schwarze <schwarze@openbsd.org>
@@ -427,7 +427,8 @@ mandocdb(int argc, char *argv[])
if (OP_TEST != op && 0 == set_basedir(path_arg, 1))
goto out;
- if ((dba = dba_read(MANDOC_DB)) != NULL) {
+ dba = nodb ? dba_new(128) : dba_read(MANDOC_DB);
+ if (dba != NULL) {
/*
* The existing database is usable. Process
* all files specified on the command-line.
@@ -444,7 +445,7 @@ mandocdb(int argc, char *argv[])
use_all = 1;
for (i = 0; i < argc; i++)
filescan(argv[i]);
- if (OP_TEST != op)
+ if (nodb == 0)
dbprune(dba);
} else {
/*