From 0e9b6a18f3953faf2cc3f247374525aba5f1711e Mon Sep 17 00:00:00 2001 From: schwarze Date: Mon, 1 Aug 2016 20:46:33 +0000 Subject: [PATCH] Repair makewhatis -t, sorry for breaking it in the previous commit. Committing this quickly because it hurts package builders. Regression reported by naddy@. --- usr.bin/mandoc/mandocdb.c | 7 ++++--- 1 file 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 * Copyright (c) 2011-2016 Ingo Schwarze @@ -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 { /* -- 2.20.1