summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.c7
-rw-r--r--manpath.c3
2 files changed, 3 insertions, 7 deletions
diff --git a/main.c b/main.c
index 860fc608..3d761e3a 100644
--- a/main.c
+++ b/main.c
@@ -300,12 +300,9 @@ main(int argc, char *argv[])
search.outkey = oarg;
else {
while (oarg != NULL) {
- thisarg = oarg;
if (manconf_output(&conf.output,
- strsep(&oarg, ","), 0) == 0)
- continue;
- warnx("-O %s: Bad argument", thisarg);
- return (int)MANDOCLEVEL_BADARG;
+ strsep(&oarg, ","), 0) == -1)
+ return (int)MANDOCLEVEL_BADARG;
}
}
}
diff --git a/manpath.c b/manpath.c
index 324a77a9..0627d5af 100644
--- a/manpath.c
+++ b/manpath.c
@@ -332,8 +332,7 @@ manconf_output(struct manoutput *conf, const char *cp, int fromfile)
conf->toc = 1;
return 0;
default:
- if (fromfile)
- warnx("-O %s: Bad argument", cp);
+ warnx("-O %s: Bad argument", cp);
return -1;
}
if (fromfile == 0)