diff options
author | Michele Marchetto <michele@cvs.openbsd.org> | 2009-09-26 11:12:51 +0000 |
---|---|---|
committer | Michele Marchetto <michele@cvs.openbsd.org> | 2009-09-26 11:12:51 +0000 |
commit | 151bfa991daa354ecea4c9d2060f041f8fa09906 (patch) | |
tree | 2a5bdd5d8ad49e04d49e052d0d063f8450cf7f0b /usr.sbin/ripd | |
parent | e69065cc663741a898902013036cd3e66f90ff1c (diff) |
Whitespace cleanup.
Diffstat (limited to 'usr.sbin/ripd')
-rw-r--r-- | usr.sbin/ripd/auth.c | 4 | ||||
-rw-r--r-- | usr.sbin/ripd/interface.c | 4 | ||||
-rw-r--r-- | usr.sbin/ripd/parse.y | 4 | ||||
-rw-r--r-- | usr.sbin/ripd/ripd.c | 48 | ||||
-rw-r--r-- | usr.sbin/ripd/ripd.h | 4 |
5 files changed, 32 insertions, 32 deletions
diff --git a/usr.sbin/ripd/auth.c b/usr.sbin/ripd/auth.c index b8c739b0d80..78f41169ca5 100644 --- a/usr.sbin/ripd/auth.c +++ b/usr.sbin/ripd/auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auth.c,v 1.9 2007/10/24 20:52:50 claudio Exp $ */ +/* $OpenBSD: auth.c,v 1.10 2009/09/26 11:12:50 michele Exp $ */ /* * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it> @@ -45,7 +45,7 @@ auth_calc_modulator(struct auth_md *md) MD5Update(&md5ctx, (void *)&md->keyid, sizeof(md->keyid)); MD5Update(&md5ctx, (void *)&md->key, MD5_DIGEST_LENGTH); MD5Final(digest, &md5ctx); - + bcopy(&digest, &r, sizeof(r)); return ((r >> 1) - time(NULL)); diff --git a/usr.sbin/ripd/interface.c b/usr.sbin/ripd/interface.c index a22fc97c90d..6d1752de309 100644 --- a/usr.sbin/ripd/interface.c +++ b/usr.sbin/ripd/interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: interface.c,v 1.6 2008/12/17 14:19:39 michele Exp $ */ +/* $OpenBSD: interface.c,v 1.7 2009/09/26 11:12:50 michele Exp $ */ /* * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it> @@ -449,7 +449,7 @@ if_del(struct iface *iface) /* revert the demotion when the interface is deleted */ if (iface->state == IF_STA_DOWN) - ripe_demote_iface(iface, 1); + ripe_demote_iface(iface, 1); /* clear lists etc */ while ((nbr = LIST_FIRST(&iface->nbr_list)) != NULL) diff --git a/usr.sbin/ripd/parse.y b/usr.sbin/ripd/parse.y index 837ff7175bd..92a34309868 100644 --- a/usr.sbin/ripd/parse.y +++ b/usr.sbin/ripd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.25 2009/07/31 16:04:34 michele Exp $ */ +/* $OpenBSD: parse.y,v 1.26 2009/09/26 11:12:50 michele Exp $ */ /* * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it> @@ -342,7 +342,7 @@ interfaceopts_l : interfaceopts_l interfaceoptsl nl | interfaceoptsl optnl ; -interfaceoptsl : PASSIVE { iface->passive = 1; } +interfaceoptsl : PASSIVE { iface->passive = 1; } | DEMOTE STRING { if (strlcpy(iface->demote_group, $2, sizeof(iface->demote_group)) >= diff --git a/usr.sbin/ripd/ripd.c b/usr.sbin/ripd/ripd.c index 721c8c8fd24..b573da4e9c8 100644 --- a/usr.sbin/ripd/ripd.c +++ b/usr.sbin/ripd/ripd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ripd.c,v 1.16 2009/06/06 08:20:55 eric Exp $ */ +/* $OpenBSD: ripd.c,v 1.17 2009/09/26 11:12:50 michele Exp $ */ /* * Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it> @@ -138,7 +138,7 @@ main(int argc, char *argv[]) case 'd': debug = 1; break; - case 'D': + case 'D': if (cmdline_symset(optarg) < 0) log_warnx("could not parse macro definition %s", optarg); @@ -338,10 +338,10 @@ main_dispatch_ripe(int fd, short event, void *bula) { struct imsgev *iev = bula; struct imsgbuf *ibuf = &iev->ibuf; - struct imsg imsg; + struct imsg imsg; struct demote_msg dmsg; - ssize_t n; - int shut = 0; + ssize_t n; + int shut = 0; if (event & EV_READ) { if ((n = imsg_read(ibuf)) == -1) @@ -543,28 +543,28 @@ rip_redistribute(struct kroute *kr) void imsg_event_add(struct imsgev *iev) { - if (iev->handler == NULL) { - imsg_flush(&iev->ibuf); - return; - } - - iev->events = EV_READ; - if (iev->ibuf.w.queued) - iev->events |= EV_WRITE; - - event_del(&iev->ev); - event_set(&iev->ev, iev->ibuf.fd, iev->events, iev->handler, iev); - event_add(&iev->ev, NULL); + if (iev->handler == NULL) { + imsg_flush(&iev->ibuf); + return; + } + + iev->events = EV_READ; + if (iev->ibuf.w.queued) + iev->events |= EV_WRITE; + + event_del(&iev->ev); + event_set(&iev->ev, iev->ibuf.fd, iev->events, iev->handler, iev); + event_add(&iev->ev, NULL); } - + int imsg_compose_event(struct imsgev *iev, u_int16_t type, u_int32_t peerid, pid_t pid, int fd, void *data, u_int16_t datalen) { - int ret; - - if ((ret = imsg_compose(&iev->ibuf, type, peerid, - pid, fd, data, datalen)) != -1) - imsg_event_add(iev); - return (ret); + int ret; + + if ((ret = imsg_compose(&iev->ibuf, type, peerid, + pid, fd, data, datalen)) != -1) + imsg_event_add(iev); + return (ret); } diff --git a/usr.sbin/ripd/ripd.h b/usr.sbin/ripd/ripd.h index 5c12401cee7..8aa4e1b48bc 100644 --- a/usr.sbin/ripd/ripd.h +++ b/usr.sbin/ripd/ripd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ripd.h,v 1.18 2009/09/24 12:30:36 michele Exp $ */ +/* $OpenBSD: ripd.h,v 1.19 2009/09/26 11:12:50 michele Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -329,7 +329,7 @@ void main_imsg_compose_ripe(int, pid_t, void *, u_int16_t); void main_imsg_compose_rde(int, pid_t, void *, u_int16_t); int rip_redistribute(struct kroute *); void imsg_event_add(struct imsgev *); -int imsg_compose_event(struct imsgev *, u_int16_t, u_int32_t, +int imsg_compose_event(struct imsgev *, u_int16_t, u_int32_t, pid_t, int, void *, u_int16_t); /* parse.y */ |