diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-01-08 02:53:10 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-01-08 02:53:10 +0000 |
commit | f6b0c55bed3ced7da6e13acf4a92653bd0aba536 (patch) | |
tree | fc7bcb5f75b1960748b96a011dc9e0b2e249750a /usr.bin/mandoc/mandocdb.c | |
parent | f416d40f7faf2c57f96c6dea877b46138d731c05 (diff) |
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 'usr.bin/mandoc/mandocdb.c')
-rw-r--r-- | usr.bin/mandoc/mandocdb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/mandoc/mandocdb.c b/usr.bin/mandoc/mandocdb.c index b234f3145ee..5fea1de469a 100644 --- a/usr.bin/mandoc/mandocdb.c +++ b/usr.bin/mandoc/mandocdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mandocdb.c,v 1.165 2016/01/08 02:13:35 schwarze Exp $ */ +/* $OpenBSD: mandocdb.c,v 1.166 2016/01/08 02:53:09 schwarze Exp $ */ /* * Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2011-2016 Ingo Schwarze <schwarze@openbsd.org> @@ -1112,8 +1112,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; } |