summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2016-08-01 20:46:34 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2016-08-01 20:46:34 +0000
commit484812edd0f4814da41e81e63c2793cf12baeb8b (patch)
tree343d6097338a818a2f05e806a6e6a60479f14d1d /usr.bin/mandoc/mandocdb.c
parentb284342bfabf678279674f9d69daa8ee6a831c58 (diff)
Repair makewhatis -t, sorry for breaking it in the previous commit.
Committing this quickly because it hurts package builders. Regression reported by naddy@.
Diffstat (limited to 'usr.bin/mandoc/mandocdb.c')
-rw-r--r--usr.bin/mandoc/mandocdb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c
index b208055ff74..3022c0f75e5 100644
--- a/usr.bin/mandoc/mandocdb.c
+++ b/usr.bin/mandoc/mandocdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mandocdb.c,v 1.173 2016/08/01 10:32:39 schwarze Exp $ */
+/* $OpenBSD: mandocdb.c,v 1.174 2016/08/01 20:46:33 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2016 Ingo Schwarze <schwarze@openbsd.org>
@@ -405,7 +405,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.
@@ -420,7 +421,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 {
/*