From 88bc2f3d403685eb613237b364c82c0042b74ee5 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 8 Jan 2016 02:53:13 +0000 Subject: 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). --- mandocdb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mandocdb.c') 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 * Copyright (c) 2011-2016 Ingo Schwarze @@ -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; } -- cgit v1.2.3