aboutsummaryrefslogtreecommitdiffstatshomepage
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
commitc2d0e548871bfed103ed040312a4333026ee10f1 (patch)
treeafd19ae4a243cb508bc5759dcba75798e61657b5 /mandocdb.c
parent88bc2f3d403685eb613237b364c82c0042b74ee5 (diff)
downloadmandoc-c2d0e548871bfed103ed040312a4333026ee10f1.tar.gz
mandoc-c2d0e548871bfed103ed040312a4333026ee10f1.tar.zst
mandoc-c2d0e548871bfed103ed040312a4333026ee10f1.zip
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.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mandocdb.c b/mandocdb.c
index 6c822efc..93cca9ec 100644
--- a/mandocdb.c
+++ b/mandocdb.c
@@ -1,4 +1,4 @@
-/* $Id: mandocdb.c,v 1.213 2016/01/08 02:53:13 schwarze Exp $ */
+/* $Id: mandocdb.c,v 1.214 2016/01/08 15:02:54 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2016 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;
}