diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-12-16 17:48:28 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2006-12-16 17:48:28 +0000 |
commit | 3b24b8b6be6d6963c2031bb1becb60bdd23f4e5b (patch) | |
tree | 4d3069084b5e25b964aa12fdb41f3e5fd2dfc471 | |
parent | 293af67fc91d5e29bd5252d502d791bd29de1cd7 (diff) |
spacing
-rw-r--r-- | usr.sbin/hostated/hce.c | 6 | ||||
-rw-r--r-- | usr.sbin/hostated/log.c | 18 | ||||
-rw-r--r-- | usr.sbin/hostated/parse.y | 63 | ||||
-rw-r--r-- | usr.sbin/hoststated/hce.c | 6 | ||||
-rw-r--r-- | usr.sbin/hoststated/log.c | 18 | ||||
-rw-r--r-- | usr.sbin/hoststated/parse.y | 63 | ||||
-rw-r--r-- | usr.sbin/relayd/hce.c | 6 | ||||
-rw-r--r-- | usr.sbin/relayd/log.c | 18 | ||||
-rw-r--r-- | usr.sbin/relayd/parse.y | 63 |
9 files changed, 129 insertions, 132 deletions
diff --git a/usr.sbin/hostated/hce.c b/usr.sbin/hostated/hce.c index 3bed9f206e3..c3d7c69eba0 100644 --- a/usr.sbin/hostated/hce.c +++ b/usr.sbin/hostated/hce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hce.c,v 1.2 2006/12/16 12:42:14 reyk Exp $ */ +/* $OpenBSD: hce.c,v 1.3 2006/12/16 17:48:27 deraadt Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -268,7 +268,7 @@ hce_dispatch_imsg(int fd, short event, void *ptr) break; default: log_debug("hce_dispatch_msg: unexpected imsg %d", - imsg.hdr.type); + imsg.hdr.type); break; } imsg_free(&imsg); @@ -288,7 +288,7 @@ hce_dispatch_parent(int fd, short event, void * ptr) case EV_READ: if ((n = imsg_read(ibuf)) == -1) fatal("hce_dispatch_parent: imsg_read error"); - if (n == 0) /* connection closed */ + if (n == 0) /* connection closed */ fatalx("hce_dispatch_parent: pipe closed"); break; case EV_WRITE: diff --git a/usr.sbin/hostated/log.c b/usr.sbin/hostated/log.c index 28a7c9a7d4c..990f0fcde62 100644 --- a/usr.sbin/hostated/log.c +++ b/usr.sbin/hostated/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.1 2006/12/16 11:45:07 reyk Exp $ */ +/* $OpenBSD: log.c,v 1.2 2006/12/16 17:48:27 deraadt Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -24,14 +24,14 @@ #include <syslog.h> /* prototypes */ -void log_init(int); -void vlog(int, const char *, va_list); -void log_warn(const char *, ...); -void log_warnx(const char *, ...); -void log_info(const char *, ...); -void log_debug(const char *, ...); -void fatal(const char *); -void fatalx(const char *); +void log_init(int); +void vlog(int, const char *, va_list); +void log_warn(const char *, ...); +void log_warnx(const char *, ...); +void log_info(const char *, ...); +void log_debug(const char *, ...); +void fatal(const char *); +void fatalx(const char *); int debug; diff --git a/usr.sbin/hostated/parse.y b/usr.sbin/hostated/parse.y index f2e008340ff..afb9d2052d4 100644 --- a/usr.sbin/hostated/parse.y +++ b/usr.sbin/hostated/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.2 2006/12/16 12:42:14 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.3 2006/12/16 17:48:27 deraadt Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -123,7 +123,7 @@ number : STRING { $$ = strtonum($1, 0, UINT_MAX, &estr); if (estr) { yyerror("cannot parse number %s : %s", - $1, estr); + $1, estr); free($1); YYERROR; } @@ -171,12 +171,12 @@ service : SERVICE STRING { } '{' optnl serviceopts_l '}' { if (service->table == NULL) { yyerror("service %s has no table", - service->name); + service->name); YYERROR; } if (TAILQ_EMPTY(&service->virts)) { yyerror("service %s has no virtual ip", - service->name); + service->name); YYERROR; } conf->servicecount++; @@ -353,8 +353,8 @@ tableoptsl : host { free($5); YYERROR; } - if (strlcpy(table->digest, $5, sizeof (table->digest)) - >= sizeof (table->digest)) { + if (strlcpy(table->digest, $5, + sizeof (table->digest)) >= sizeof (table->digest)) { yyerror("http digest truncated"); free($3); free($5); @@ -373,7 +373,7 @@ tableoptsl : host { | DISABLE { table->flags |= F_DISABLE; } ; -interface : /*empty*/ { $$ = NULL; } +interface : /*empty*/ { $$ = NULL; } | INTERFACE STRING { $$ = $2; } ; @@ -452,27 +452,27 @@ lookup(char *s) { /* this has to be sorted always */ static const struct keywords keywords[] = { - {"backup", BACKUP}, - {"check", CHECK}, - {"code", CODE}, - {"digest", DIGEST}, - {"disable", DISABLE}, - {"external", EXTERNAL}, - {"host", HOST}, - {"http", HTTP}, - {"https", HTTPS}, - {"icmp", ICMP}, - {"interface", INTERFACE}, - {"interval", INTERVAL}, - {"ip", IP}, - {"port", PORT}, - {"real", REAL}, - {"service", SERVICE}, - {"table", TABLE}, - {"tag", TAG}, - {"tcp", TCP}, - {"timeout", TIMEOUT}, - {"virtual", VIRTUAL} + { "backup", BACKUP }, + { "check", CHECK }, + { "code", CODE }, + { "digest", DIGEST }, + { "disable", DISABLE }, + { "external", EXTERNAL }, + { "host", HOST }, + { "http", HTTP }, + { "https", HTTPS }, + { "icmp", ICMP }, + { "interface", INTERFACE }, + { "interval", INTERVAL }, + { "ip", IP }, + { "port", PORT }, + { "real", REAL }, + { "service", SERVICE }, + { "table", TABLE }, + { "tag", TAG }, + { "tcp", TCP }, + { "timeout", TIMEOUT }, + { "virtual", VIRTUA L} }; const struct keywords *p; @@ -861,7 +861,7 @@ host_dns(const char *s, struct addresslist *al, int max, hints.ai_socktype = SOCK_DGRAM; /* DUMMY */ error = getaddrinfo(s, NULL, &hints, &res0); if (error == EAI_AGAIN || error == EAI_NODATA || error == EAI_NONAME) - return (0); + return (0); if (error) { log_warnx("host_dns: could not parse \"%s\": %s", s, gai_strerror(error)); @@ -900,16 +900,15 @@ host_dns(const char *s, struct addresslist *al, int max, } if (cnt == max && res) { log_warnx("host_dns: %s resolves to more than %d hosts", - s, max); + s, max); } freeaddrinfo(res0); - return (cnt); } int host(const char *s, struct addresslist *al, int max, - in_port_t port, const char *ifname) + in_port_t port, const char *ifname) { struct address *h; diff --git a/usr.sbin/hoststated/hce.c b/usr.sbin/hoststated/hce.c index 3bed9f206e3..c3d7c69eba0 100644 --- a/usr.sbin/hoststated/hce.c +++ b/usr.sbin/hoststated/hce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hce.c,v 1.2 2006/12/16 12:42:14 reyk Exp $ */ +/* $OpenBSD: hce.c,v 1.3 2006/12/16 17:48:27 deraadt Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -268,7 +268,7 @@ hce_dispatch_imsg(int fd, short event, void *ptr) break; default: log_debug("hce_dispatch_msg: unexpected imsg %d", - imsg.hdr.type); + imsg.hdr.type); break; } imsg_free(&imsg); @@ -288,7 +288,7 @@ hce_dispatch_parent(int fd, short event, void * ptr) case EV_READ: if ((n = imsg_read(ibuf)) == -1) fatal("hce_dispatch_parent: imsg_read error"); - if (n == 0) /* connection closed */ + if (n == 0) /* connection closed */ fatalx("hce_dispatch_parent: pipe closed"); break; case EV_WRITE: diff --git a/usr.sbin/hoststated/log.c b/usr.sbin/hoststated/log.c index 28a7c9a7d4c..990f0fcde62 100644 --- a/usr.sbin/hoststated/log.c +++ b/usr.sbin/hoststated/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.1 2006/12/16 11:45:07 reyk Exp $ */ +/* $OpenBSD: log.c,v 1.2 2006/12/16 17:48:27 deraadt Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -24,14 +24,14 @@ #include <syslog.h> /* prototypes */ -void log_init(int); -void vlog(int, const char *, va_list); -void log_warn(const char *, ...); -void log_warnx(const char *, ...); -void log_info(const char *, ...); -void log_debug(const char *, ...); -void fatal(const char *); -void fatalx(const char *); +void log_init(int); +void vlog(int, const char *, va_list); +void log_warn(const char *, ...); +void log_warnx(const char *, ...); +void log_info(const char *, ...); +void log_debug(const char *, ...); +void fatal(const char *); +void fatalx(const char *); int debug; diff --git a/usr.sbin/hoststated/parse.y b/usr.sbin/hoststated/parse.y index f2e008340ff..afb9d2052d4 100644 --- a/usr.sbin/hoststated/parse.y +++ b/usr.sbin/hoststated/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.2 2006/12/16 12:42:14 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.3 2006/12/16 17:48:27 deraadt Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -123,7 +123,7 @@ number : STRING { $$ = strtonum($1, 0, UINT_MAX, &estr); if (estr) { yyerror("cannot parse number %s : %s", - $1, estr); + $1, estr); free($1); YYERROR; } @@ -171,12 +171,12 @@ service : SERVICE STRING { } '{' optnl serviceopts_l '}' { if (service->table == NULL) { yyerror("service %s has no table", - service->name); + service->name); YYERROR; } if (TAILQ_EMPTY(&service->virts)) { yyerror("service %s has no virtual ip", - service->name); + service->name); YYERROR; } conf->servicecount++; @@ -353,8 +353,8 @@ tableoptsl : host { free($5); YYERROR; } - if (strlcpy(table->digest, $5, sizeof (table->digest)) - >= sizeof (table->digest)) { + if (strlcpy(table->digest, $5, + sizeof (table->digest)) >= sizeof (table->digest)) { yyerror("http digest truncated"); free($3); free($5); @@ -373,7 +373,7 @@ tableoptsl : host { | DISABLE { table->flags |= F_DISABLE; } ; -interface : /*empty*/ { $$ = NULL; } +interface : /*empty*/ { $$ = NULL; } | INTERFACE STRING { $$ = $2; } ; @@ -452,27 +452,27 @@ lookup(char *s) { /* this has to be sorted always */ static const struct keywords keywords[] = { - {"backup", BACKUP}, - {"check", CHECK}, - {"code", CODE}, - {"digest", DIGEST}, - {"disable", DISABLE}, - {"external", EXTERNAL}, - {"host", HOST}, - {"http", HTTP}, - {"https", HTTPS}, - {"icmp", ICMP}, - {"interface", INTERFACE}, - {"interval", INTERVAL}, - {"ip", IP}, - {"port", PORT}, - {"real", REAL}, - {"service", SERVICE}, - {"table", TABLE}, - {"tag", TAG}, - {"tcp", TCP}, - {"timeout", TIMEOUT}, - {"virtual", VIRTUAL} + { "backup", BACKUP }, + { "check", CHECK }, + { "code", CODE }, + { "digest", DIGEST }, + { "disable", DISABLE }, + { "external", EXTERNAL }, + { "host", HOST }, + { "http", HTTP }, + { "https", HTTPS }, + { "icmp", ICMP }, + { "interface", INTERFACE }, + { "interval", INTERVAL }, + { "ip", IP }, + { "port", PORT }, + { "real", REAL }, + { "service", SERVICE }, + { "table", TABLE }, + { "tag", TAG }, + { "tcp", TCP }, + { "timeout", TIMEOUT }, + { "virtual", VIRTUA L} }; const struct keywords *p; @@ -861,7 +861,7 @@ host_dns(const char *s, struct addresslist *al, int max, hints.ai_socktype = SOCK_DGRAM; /* DUMMY */ error = getaddrinfo(s, NULL, &hints, &res0); if (error == EAI_AGAIN || error == EAI_NODATA || error == EAI_NONAME) - return (0); + return (0); if (error) { log_warnx("host_dns: could not parse \"%s\": %s", s, gai_strerror(error)); @@ -900,16 +900,15 @@ host_dns(const char *s, struct addresslist *al, int max, } if (cnt == max && res) { log_warnx("host_dns: %s resolves to more than %d hosts", - s, max); + s, max); } freeaddrinfo(res0); - return (cnt); } int host(const char *s, struct addresslist *al, int max, - in_port_t port, const char *ifname) + in_port_t port, const char *ifname) { struct address *h; diff --git a/usr.sbin/relayd/hce.c b/usr.sbin/relayd/hce.c index 3bed9f206e3..c3d7c69eba0 100644 --- a/usr.sbin/relayd/hce.c +++ b/usr.sbin/relayd/hce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hce.c,v 1.2 2006/12/16 12:42:14 reyk Exp $ */ +/* $OpenBSD: hce.c,v 1.3 2006/12/16 17:48:27 deraadt Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -268,7 +268,7 @@ hce_dispatch_imsg(int fd, short event, void *ptr) break; default: log_debug("hce_dispatch_msg: unexpected imsg %d", - imsg.hdr.type); + imsg.hdr.type); break; } imsg_free(&imsg); @@ -288,7 +288,7 @@ hce_dispatch_parent(int fd, short event, void * ptr) case EV_READ: if ((n = imsg_read(ibuf)) == -1) fatal("hce_dispatch_parent: imsg_read error"); - if (n == 0) /* connection closed */ + if (n == 0) /* connection closed */ fatalx("hce_dispatch_parent: pipe closed"); break; case EV_WRITE: diff --git a/usr.sbin/relayd/log.c b/usr.sbin/relayd/log.c index 28a7c9a7d4c..990f0fcde62 100644 --- a/usr.sbin/relayd/log.c +++ b/usr.sbin/relayd/log.c @@ -1,4 +1,4 @@ -/* $OpenBSD: log.c,v 1.1 2006/12/16 11:45:07 reyk Exp $ */ +/* $OpenBSD: log.c,v 1.2 2006/12/16 17:48:27 deraadt Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -24,14 +24,14 @@ #include <syslog.h> /* prototypes */ -void log_init(int); -void vlog(int, const char *, va_list); -void log_warn(const char *, ...); -void log_warnx(const char *, ...); -void log_info(const char *, ...); -void log_debug(const char *, ...); -void fatal(const char *); -void fatalx(const char *); +void log_init(int); +void vlog(int, const char *, va_list); +void log_warn(const char *, ...); +void log_warnx(const char *, ...); +void log_info(const char *, ...); +void log_debug(const char *, ...); +void fatal(const char *); +void fatalx(const char *); int debug; diff --git a/usr.sbin/relayd/parse.y b/usr.sbin/relayd/parse.y index f2e008340ff..afb9d2052d4 100644 --- a/usr.sbin/relayd/parse.y +++ b/usr.sbin/relayd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.2 2006/12/16 12:42:14 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.3 2006/12/16 17:48:27 deraadt Exp $ */ /* * Copyright (c) 2006 Pierre-Yves Ritschard <pyr@spootnik.org> @@ -123,7 +123,7 @@ number : STRING { $$ = strtonum($1, 0, UINT_MAX, &estr); if (estr) { yyerror("cannot parse number %s : %s", - $1, estr); + $1, estr); free($1); YYERROR; } @@ -171,12 +171,12 @@ service : SERVICE STRING { } '{' optnl serviceopts_l '}' { if (service->table == NULL) { yyerror("service %s has no table", - service->name); + service->name); YYERROR; } if (TAILQ_EMPTY(&service->virts)) { yyerror("service %s has no virtual ip", - service->name); + service->name); YYERROR; } conf->servicecount++; @@ -353,8 +353,8 @@ tableoptsl : host { free($5); YYERROR; } - if (strlcpy(table->digest, $5, sizeof (table->digest)) - >= sizeof (table->digest)) { + if (strlcpy(table->digest, $5, + sizeof (table->digest)) >= sizeof (table->digest)) { yyerror("http digest truncated"); free($3); free($5); @@ -373,7 +373,7 @@ tableoptsl : host { | DISABLE { table->flags |= F_DISABLE; } ; -interface : /*empty*/ { $$ = NULL; } +interface : /*empty*/ { $$ = NULL; } | INTERFACE STRING { $$ = $2; } ; @@ -452,27 +452,27 @@ lookup(char *s) { /* this has to be sorted always */ static const struct keywords keywords[] = { - {"backup", BACKUP}, - {"check", CHECK}, - {"code", CODE}, - {"digest", DIGEST}, - {"disable", DISABLE}, - {"external", EXTERNAL}, - {"host", HOST}, - {"http", HTTP}, - {"https", HTTPS}, - {"icmp", ICMP}, - {"interface", INTERFACE}, - {"interval", INTERVAL}, - {"ip", IP}, - {"port", PORT}, - {"real", REAL}, - {"service", SERVICE}, - {"table", TABLE}, - {"tag", TAG}, - {"tcp", TCP}, - {"timeout", TIMEOUT}, - {"virtual", VIRTUAL} + { "backup", BACKUP }, + { "check", CHECK }, + { "code", CODE }, + { "digest", DIGEST }, + { "disable", DISABLE }, + { "external", EXTERNAL }, + { "host", HOST }, + { "http", HTTP }, + { "https", HTTPS }, + { "icmp", ICMP }, + { "interface", INTERFACE }, + { "interval", INTERVAL }, + { "ip", IP }, + { "port", PORT }, + { "real", REAL }, + { "service", SERVICE }, + { "table", TABLE }, + { "tag", TAG }, + { "tcp", TCP }, + { "timeout", TIMEOUT }, + { "virtual", VIRTUA L} }; const struct keywords *p; @@ -861,7 +861,7 @@ host_dns(const char *s, struct addresslist *al, int max, hints.ai_socktype = SOCK_DGRAM; /* DUMMY */ error = getaddrinfo(s, NULL, &hints, &res0); if (error == EAI_AGAIN || error == EAI_NODATA || error == EAI_NONAME) - return (0); + return (0); if (error) { log_warnx("host_dns: could not parse \"%s\": %s", s, gai_strerror(error)); @@ -900,16 +900,15 @@ host_dns(const char *s, struct addresslist *al, int max, } if (cnt == max && res) { log_warnx("host_dns: %s resolves to more than %d hosts", - s, max); + s, max); } freeaddrinfo(res0); - return (cnt); } int host(const char *s, struct addresslist *al, int max, - in_port_t port, const char *ifname) + in_port_t port, const char *ifname) { struct address *h; |