summaryrefslogtreecommitdiffstats
path: root/usr.sbin/crunchgen
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-11-11 02:52:46 +0000
committerderaadt <deraadt@openbsd.org>2015-11-11 02:52:46 +0000
commit9b32031c48e1ad900fa787ce2c5170e5d734e355 (patch)
tree1e492a87268013d2ed10fb21d56c3825e60c6370 /usr.sbin/crunchgen
parentmark ehci_intr() as IPL_MPSAFE here as well (diff)
downloadwireguard-openbsd-9b32031c48e1ad900fa787ce2c5170e5d734e355.tar.xz
wireguard-openbsd-9b32031c48e1ad900fa787ce2c5170e5d734e355.zip
exit() after perror() for pledge failure. Perhaps this got introduced
as a test idiom, either when pledge was young or during the transition to strings.... dunno
Diffstat (limited to 'usr.sbin/crunchgen')
-rw-r--r--usr.sbin/crunchgen/crunchgen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/crunchgen/crunchgen.c b/usr.sbin/crunchgen/crunchgen.c
index 4213b91594b..938f44a5225 100644
--- a/usr.sbin/crunchgen/crunchgen.c
+++ b/usr.sbin/crunchgen/crunchgen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: crunchgen.c,v 1.15 2015/10/13 15:11:48 deraadt Exp $ */
+/* $OpenBSD: crunchgen.c,v 1.16 2015/11/11 02:52:46 deraadt Exp $ */
/*
* Copyright (c) 1994 University of Maryland
@@ -118,8 +118,10 @@ main(int argc, char *argv[])
extern int optind;
extern char *optarg;
- if (pledge("stdio rpath wpath cpath proc exec", NULL) == -1)
+ if (pledge("stdio rpath wpath cpath proc exec", NULL) == -1) {
perror("pledge");
+ exit(1);
+ }
while ((optc = getopt(argc, argv, "hm:c:e:fqD:EL:O:M")) != -1) {
switch (optc) {