summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgsoares <gsoares@openbsd.org>2016-01-13 13:13:04 +0000
committergsoares <gsoares@openbsd.org>2016-01-13 13:13:04 +0000
commitcf44fbd51c6a8a285a3c307669f3031039f7cc74 (patch)
treec8c11fd0de0dda015a448ca6bafbf3180cef2742
parentthere's a resource leak here. missing a fclose(3) to kill the stream. (diff)
downloadwireguard-openbsd-cf44fbd51c6a8a285a3c307669f3031039f7cc74.tar.xz
wireguard-openbsd-cf44fbd51c6a8a285a3c307669f3031039f7cc74.zip
fix exit status on pledge fail, eval here should be 2.
OK tb@
-rw-r--r--bin/test/test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/test/test.c b/bin/test/test.c
index b69d342e3ed..f14624755da 100644
--- a/bin/test/test.c
+++ b/bin/test/test.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: test.c,v 1.15 2015/10/09 01:37:06 deraadt Exp $ */
+/* $OpenBSD: test.c,v 1.16 2016/01/13 13:13:04 gsoares Exp $ */
/* $NetBSD: test.c,v 1.15 1995/03/21 07:04:06 cgd Exp $ */
/*
@@ -159,7 +159,7 @@ main(int argc, char *argv[])
int res;
if (pledge("stdio rpath", NULL) == -1)
- err(1, "pledge");
+ err(2, "pledge");
if (strcmp(__progname, "[") == 0) {
if (strcmp(argv[--argc], "]"))