summaryrefslogtreecommitdiffstats
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
commit63629b45891523da62daada0d2e7799efa2a897d (patch)
tree65be24da8849d2182a29f3ee458b831f260d8bc3 /mandocdb.c
parentecbe96af66d49663ef0bec755a2b46f6d4c29706 (diff)
downloadmandoc-63629b45891523da62daada0d2e7799efa2a897d.tar.gz
Repair makewhatis -t, regression in rev. 1.221 reported by naddy@.
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mandocdb.c b/mandocdb.c
index c525537e..a39690e9 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -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 {
/*