aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-01-08 02:53:13 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-01-08 02:53:13 +0000
commit88bc2f3d403685eb613237b364c82c0042b74ee5 (patch)
tree8003e0df848412664c88194e5e2f1b078478ffc0 /mandocdb.c
parent04d39401bf641371ebd7d33949c6022bf67ee762 (diff)
downloadmandoc-88bc2f3d403685eb613237b364c82c0042b74ee5.tar.gz
mandoc-88bc2f3d403685eb613237b364c82c0042b74ee5.tar.zst
mandoc-88bc2f3d403685eb613237b364c82c0042b74ee5.zip
Simplify the mparse_open() interface.
Just return the file descriptor or -1 on error; there is just one kind of error anyway. Suggested by Christos Zoulas (NetBSD).
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mandocdb.c b/mandocdb.c
index d3701d6f..6c822efc 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.212 2016/01/08 02:13:39 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.213 2016/01/08 02:53:13 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2016 Ingo Schwarze <schwarze@openbsd.org>
@@ -1134,8 +1134,7 @@ mpages_merge(struct mparse *mp)
man = NULL;
sodest = NULL;
- mparse_open(mp, &fd, mlink->file);
- if (fd == -1) {
+ if ((fd = mparse_open(mp, mlink->file)) == -1) {
say(mlink->file, "&open");
goto nextpage;
}