diff options
author | millert <millert@openbsd.org> | 2015-12-31 16:22:27 +0000 |
---|---|---|
committer | millert <millert@openbsd.org> | 2015-12-31 16:22:27 +0000 |
commit | ef9ad095bc54d1b3f793a07d6f3d82426c74ea3e (patch) | |
tree | 21076b6bbb7c98b910930eb7cd37ccf826641b5a | |
parent | Remove use of sysexits.h. (diff) | |
download | wireguard-openbsd-ef9ad095bc54d1b3f793a07d6f3d82426c74ea3e.tar.xz wireguard-openbsd-ef9ad095bc54d1b3f793a07d6f3d82426c74ea3e.zip |
Do not mix EX_* from sysexits.h and EXIT_* from stdlib.h, just use
EXIT_*.
-rw-r--r-- | usr.sbin/radiusctl/radiusctl.c | 5 | ||||
-rw-r--r-- | usr.sbin/radiusd/radiusd.c | 9 |
2 files changed, 6 insertions, 8 deletions
diff --git a/usr.sbin/radiusctl/radiusctl.c b/usr.sbin/radiusctl/radiusctl.c index c0e82354fe0..49c238f6030 100644 --- a/usr.sbin/radiusctl/radiusctl.c +++ b/usr.sbin/radiusctl/radiusctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radiusctl.c,v 1.5 2015/10/19 22:07:37 yasuoka Exp $ */ +/* $OpenBSD: radiusctl.c,v 1.6 2015/12/31 16:22:27 millert Exp $ */ /* * Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net> * @@ -26,7 +26,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sysexits.h> #include <unistd.h> #include <radius.h> @@ -59,7 +58,7 @@ main(int argc, char *argv[]) switch (ch) { default: usage(); - return (EX_USAGE); + return (EXIT_FAILURE); } argc -= optind; argv += optind; diff --git a/usr.sbin/radiusd/radiusd.c b/usr.sbin/radiusd/radiusd.c index f5ebc0a84fc..7ed581d3075 100644 --- a/usr.sbin/radiusd/radiusd.c +++ b/usr.sbin/radiusd/radiusd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radiusd.c,v 1.13 2015/12/05 06:50:52 mmcc Exp $ */ +/* $OpenBSD: radiusd.c,v 1.14 2015/12/31 16:22:27 millert Exp $ */ /* * Copyright (c) 2013 Internet Initiative Japan Inc. @@ -38,7 +38,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <sysexits.h> #include <syslog.h> #include <unistd.h> #include <util.h> @@ -95,7 +94,7 @@ usage(void) extern char *__progname; fprintf(stderr, "usage: %s [-dn] [-f file]\n", __progname); - exit(EX_USAGE); + exit(EXIT_FAILURE); } int @@ -140,7 +139,7 @@ main(int argc, char *argv[]) log_init(debug); if (parse_config(conffile, radiusd) != 0) - errx(EX_DATAERR, "config error"); + errx(EXIT_FAILURE, "config error"); if (noaction) { fprintf(stderr, "configuration OK\n"); exit(EXIT_SUCCESS); @@ -173,7 +172,7 @@ main(int argc, char *argv[]) signal_set(&radiusd->ev_sigchld, SIGCHLD, radiusd_on_sigchld, radiusd); if (radiusd_start(radiusd) != 0) - errx(EX_DATAERR, "start failed"); + errx(EXIT_FAILURE, "start failed"); #ifdef RADIUSD_DEBUG if (pledge("stdio inet proc abort", NULL) == -1) |