aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandocdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mandocdb.c b/mandocdb.c
index d9f57416..7e2b4a54 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.6 2011/09/17 13:54:27 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.7 2011/11/13 00:53:13 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
@@ -1168,10 +1168,9 @@ pman_node(MAN_ARGS)
}
}
- if (pman_node(hash, buf, dbuf, n->child))
- return(1);
- if (pman_node(hash, buf, dbuf, n->next))
- return(1);
+ for (n = n->child; n; n = n->next)
+ if (pman_node(hash, buf, dbuf, n))
+ return(1);
return(0);
}
@@ -1276,6 +1275,7 @@ ofile_dirbuild(const char *dir, int verb, struct of **of)
}
}
+ closedir(d);
return(1);
}