summaryrefslogtreecommitdiffstats
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
commitfebef6ac411b15bf06ccd1f405d0af42e79d5e0e (patch)
treec339a2ee2105503f8efd99618824fae22797d05d /mandocdb.c
parentd28fad77486ce53230d4b8b5731e7f06276c2e92 (diff)
downloadmandoc-febef6ac411b15bf06ccd1f405d0af42e79d5e0e.tar.gz
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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 3b089194..f222a752 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -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;
}