summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2015-07-27 08:43:12 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2015-07-27 08:43:12 +0000
commit17b09a5e7cd29533721c5416d2699650be27858f (patch)
tree0c66bd6bde758c7c9a73e05b131047216efcdaa9
parent96d4225c7c4cf75bf360ac16ad4bc13175dcd581 (diff)
Use log_warn() instead of warn() in radiusd_module_load(). Also fix style.
-rw-r--r--usr.sbin/radiusd/radiusd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/radiusd/radiusd.c b/usr.sbin/radiusd/radiusd.c
index e4458a42182..689a9f0a0ab 100644
--- a/usr.sbin/radiusd/radiusd.c
+++ b/usr.sbin/radiusd/radiusd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radiusd.c,v 1.2 2015/07/21 07:04:53 schwarze Exp $ */
+/* $OpenBSD: radiusd.c,v 1.3 2015/07/27 08:43:11 yasuoka Exp $ */
/*
* Copyright (c) 2013 Internet Initiative Japan Inc.
@@ -151,7 +151,7 @@ main(int argc, char *argv[])
daemon(0, 0);
if ((pw = getpwnam(RADIUSD_USER)) == NULL)
- errx(EXIT_FAILURE, "user `%s' is not found in password "
+ errx(EXIT_FAILURE, "user `%s' is not found in password "
"database", RADIUSD_USER);
if (chroot(pw->pw_dir) == -1)
@@ -742,7 +742,7 @@ radius_code_string(int code)
if (codestrings[i].code == code)
return (codestrings[i].string);
- return "Unknown";
+ return ("Unknown");
}
void
@@ -935,7 +935,7 @@ radiusd_module_load(struct radiusd *radiusd, const char *path, const char *name)
fatal("Out of memory");
module->radiusd = radiusd;
- if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pairsock) == -1) {
+ if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, pairsock) == -1) {
log_warn("Could not load module `%s'(%s): pipe()", name, path);
goto on_error;
}
@@ -956,7 +956,7 @@ radiusd_module_load(struct radiusd *radiusd, const char *path, const char *name)
close(pairsock[1]);
closefrom(STDERR_FILENO + 1);
execv(path, (char * const *)av);
- warn("Failed to execute %s", path);
+ log_warn("Failed to execute %s", path);
_exit(EXIT_FAILURE);
}
close(pairsock[1]);