diff options
author | Hakan Olsson <ho@cvs.openbsd.org> | 2005-05-22 12:14:17 +0000 |
---|---|---|
committer | Hakan Olsson <ho@cvs.openbsd.org> | 2005-05-22 12:14:17 +0000 |
commit | 8ca02062561fae6bddf7499b1e6bb7196eaba647 (patch) | |
tree | 0e67e52e248f9671ac4862f43b81b7b0d692fe7f /usr.sbin/sasyncd | |
parent | 17552c0aece3c24d0bc4a2ce2a41d01b80df3592 (diff) |
style nits
Diffstat (limited to 'usr.sbin/sasyncd')
-rw-r--r-- | usr.sbin/sasyncd/log.c | 9 | ||||
-rw-r--r-- | usr.sbin/sasyncd/net_ctl.c | 5 | ||||
-rw-r--r-- | usr.sbin/sasyncd/sasyncd.c | 6 | ||||
-rw-r--r-- | usr.sbin/sasyncd/sasyncd.h | 3 |
4 files changed, 12 insertions, 11 deletions
diff --git a/usr.sbin/sasyncd/log.c b/usr.sbin/sasyncd/log.c index d8163468c34..e7e7aa9fd4b 100644 --- a/usr.sbin/sasyncd/log.c +++ b/usr.sbin/sasyncd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.2 2005/03/30 18:56:19 ho Exp $ */ +/* $OpenBSD: log.c,v 1.3 2005/05/22 12:14:16 ho Exp $ */ /* * Copyright (c) 2005 Håkan Olsson. All rights reserved. @@ -62,8 +62,9 @@ log_output(char *msg) void log_err(const char *fmt, ...) { - va_list ap; - int off = 0; + extern char *__progname; + int off = 0; + va_list ap; if (cfgstate.debug) { snprintf(logbuf, sizeof logbuf, "%s: ", __progname); @@ -75,7 +76,7 @@ log_err(const char *fmt, ...) va_end(ap); strlcat(logbuf, ": ", sizeof logbuf); - strlcat(logbuf, strerror (errno), sizeof logbuf); + strlcat(logbuf, strerror(errno), sizeof logbuf); log_output(logbuf); return; diff --git a/usr.sbin/sasyncd/net_ctl.c b/usr.sbin/sasyncd/net_ctl.c index 97cabfa97f4..f58668363d3 100644 --- a/usr.sbin/sasyncd/net_ctl.c +++ b/usr.sbin/sasyncd/net_ctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: net_ctl.c,v 1.1 2005/03/30 18:44:49 ho Exp $ */ +/* $OpenBSD: net_ctl.c,v 1.2 2005/05/22 12:14:16 ho Exp $ */ /* * Copyright (c) 2005 Håkan Olsson. All rights reserved. @@ -62,8 +62,7 @@ net_ctl_check_state(struct syncpeer *p, enum RUNSTATE nstate) net_ctl_send_error(p, CTL_STATE); return -1; } - if (cfgstate.runstate == MASTER && - nstate == MASTER) { + if (cfgstate.runstate == MASTER && nstate == MASTER) { log_msg(0, "got bad state MASTER from peer \"%s\"", p->name); net_ctl_send_error(p, CTL_STATE); diff --git a/usr.sbin/sasyncd/sasyncd.c b/usr.sbin/sasyncd/sasyncd.c index c9dd08c2b9c..b859cb3ed69 100644 --- a/usr.sbin/sasyncd/sasyncd.c +++ b/usr.sbin/sasyncd/sasyncd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sasyncd.c,v 1.5 2005/05/03 05:44:35 djm Exp $ */ +/* $OpenBSD: sasyncd.c,v 1.6 2005/05/22 12:14:16 ho Exp $ */ /* * Copyright (c) 2005 Håkan Olsson. All rights reserved. @@ -47,6 +47,7 @@ static void privdrop(void) { struct passwd *pw = getpwnam(SASYNCD_USER); + extern char *__progname; if (!pw) { log_err("%s: getpwnam(\"%s\") failed", __progname, @@ -141,7 +142,8 @@ sasyncd_run(void) int main(int argc, char **argv) { - int r; + extern char *__progname; + int r; /* Init. */ closefrom(STDERR_FILENO + 1); diff --git a/usr.sbin/sasyncd/sasyncd.h b/usr.sbin/sasyncd/sasyncd.h index f1d6c8f3ef6..57648575482 100644 --- a/usr.sbin/sasyncd/sasyncd.h +++ b/usr.sbin/sasyncd/sasyncd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sasyncd.h,v 1.2 2005/04/03 17:19:26 ho Exp $ */ +/* $OpenBSD: sasyncd.h,v 1.3 2005/05/22 12:14:16 ho Exp $ */ /* * Copyright (c) 2005 Håkan Olsson. All rights reserved. @@ -62,7 +62,6 @@ struct cfgstate { }; extern struct cfgstate cfgstate; -extern char *__progname; #define SASYNCD_USER "_isakmpd" #define SASYNCD_CFGFILE "/etc/sasyncd.conf" |