summaryrefslogtreecommitdiff
path: root/usr.bin/infocmp
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-11 02:52:47 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-11-11 02:52:47 +0000
commitfe9e8af8f3246e14a9eb585feb4d7f5aaa093855 (patch)
tree3281fbb5b5f5de11321c6825dd5a2c6d70e07068 /usr.bin/infocmp
parent0edf0956a8620a9cd461d3f081c92645c20c8b9e (diff)
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.bin/infocmp')
-rw-r--r--usr.bin/infocmp/infocmp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/infocmp/infocmp.c b/usr.bin/infocmp/infocmp.c
index dc6d424cea6..cedb8dc7fcf 100644
--- a/usr.bin/infocmp/infocmp.c
+++ b/usr.bin/infocmp/infocmp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: infocmp.c,v 1.21 2015/10/10 15:08:49 deraadt Exp $ */
+/* $OpenBSD: infocmp.c,v 1.22 2015/11/11 02:52:46 deraadt Exp $ */
/****************************************************************************
* Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. *
@@ -44,7 +44,7 @@
#include <dump_entry.h>
-MODULE_ID("$Id: infocmp.c,v 1.21 2015/10/10 15:08:49 deraadt Exp $")
+MODULE_ID("$Id: infocmp.c,v 1.22 2015/11/11 02:52:46 deraadt Exp $")
#define L_CURL "{"
#define R_CURL "}"
@@ -1282,8 +1282,10 @@ main(int argc, char *argv[])
bool init_analyze = FALSE;
bool suppress_untranslatable = FALSE;
- if (pledge("stdio rpath", NULL) == -1)
+ if (pledge("stdio rpath", NULL) == -1) {
perror("pledge");
+ exit(1);
+ }
/* where is the terminfo database location going to default to? */
restdir = firstdir = 0;