summaryrefslogtreecommitdiff
path: root/usr.bin/cmp
diff options
context:
space:
mode:
authorGleydson Soares <gsoares@cvs.openbsd.org>2015-12-29 19:04:47 +0000
committerGleydson Soares <gsoares@cvs.openbsd.org>2015-12-29 19:04:47 +0000
commit9a7ad9bc671dfac4e4bff7b42c15771dfebe74e0 (patch)
tree986bfd621400a7e24a44a7b54c9c2875af099442 /usr.bin/cmp
parentfa9be73bc12da2e753d60deda85fd4d5088dfe8d (diff)
fix exit status on pledge(2) failure.
OK tb@ jsg@
Diffstat (limited to 'usr.bin/cmp')
-rw-r--r--usr.bin/cmp/cmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cmp/cmp.c b/usr.bin/cmp/cmp.c
index 0b5c86345a1..82a9c4b898f 100644
--- a/usr.bin/cmp/cmp.c
+++ b/usr.bin/cmp/cmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmp.c,v 1.13 2015/10/10 05:35:22 doug Exp $ */
+/* $OpenBSD: cmp.c,v 1.14 2015/12/29 19:04:46 gsoares Exp $ */
/* $NetBSD: cmp.c,v 1.7 1995/09/08 03:22:56 tls Exp $ */
/*
@@ -58,7 +58,7 @@ main(int argc, char *argv[])
setlocale(LC_ALL, "");
if (pledge("stdio rpath", NULL) == -1)
- err(1, "pledge");
+ err(ERR_EXIT, "pledge");
while ((ch = getopt(argc, argv, "ls")) != -1)
switch (ch) {
@@ -113,7 +113,7 @@ main(int argc, char *argv[])
}
if (pledge("stdio", NULL) == -1)
- err(1, "pledge");
+ err(ERR_EXIT, "pledge");
skip1 = argc > 2 ? strtoq(argv[2], NULL, 0) : 0;
skip2 = argc == 4 ? strtoq(argv[3], NULL, 0) : 0;