summaryrefslogtreecommitdiffstats
path: root/mandocdb.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-01-08 15:02:54 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-01-08 15:02:54 +0000
commit299687341193ef2f4290c7f376f73f92c6948fbf (patch)
treed5e5662ebbcf3073497d5c5b03f8c97e031aebd6 /mandocdb.c
parentfebef6ac411b15bf06ccd1f405d0af42e79d5e0e (diff)
downloadmandoc-299687341193ef2f4290c7f376f73f92c6948fbf.tar.gz
Prefer warn(3) over perror(3) at the few places where it was used.
It is useful to see the program name, and we have err.h compat in place anyway. Suggested by Christos Zoulas (NetBSD).
Diffstat (limited to 'mandocdb.c')
-rw-r--r--mandocdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mandocdb.c b/mandocdb.c
index f222a752..8d9781a7 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -341,7 +341,7 @@ mandocdb(int argc, char *argv[])
#if HAVE_PLEDGE
if (pledge("stdio rpath wpath cpath fattr flock proc exec", NULL) == -1) {
- perror("pledge");
+ warn("pledge");
return (int)MANDOCLEVEL_SYSERR;
}
#endif
@@ -422,7 +422,7 @@ mandocdb(int argc, char *argv[])
#if HAVE_PLEDGE
if (nodb) {
if (pledge("stdio rpath", NULL) == -1) {
- perror("pledge");
+ warn("pledge");
return (int)MANDOCLEVEL_SYSERR;
}
}
@@ -456,7 +456,7 @@ mandocdb(int argc, char *argv[])
#if HAVE_PLEDGE
if (!nodb) {
if (pledge("stdio rpath wpath cpath fattr flock", NULL) == -1) {
- perror("pledge");
+ warn("pledge");
exitcode = (int)MANDOCLEVEL_SYSERR;
goto out;
}