summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2005-02-02 19:15:08 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2005-02-02 19:15:08 +0000
commit5164f22045ff4ead85971dcc53593d956a984609 (patch)
treea08bcabbc07cebf8040ed1c70421ce3e4d6a3bb3
parentedb3ea6975f6433dca5a6198ed41066adbc60b5f (diff)
KNF
-rw-r--r--usr.sbin/ospfd/database.c4
-rw-r--r--usr.sbin/ospfd/interface.c4
-rw-r--r--usr.sbin/ospfd/lsack.c4
-rw-r--r--usr.sbin/ospfd/lsreq.c4
-rw-r--r--usr.sbin/ospfd/lsupdate.c10
-rw-r--r--usr.sbin/ospfd/neighbor.c8
-rw-r--r--usr.sbin/ospfd/ospfd.h4
-rw-r--r--usr.sbin/ospfd/ospfe.c5
-rw-r--r--usr.sbin/ospfd/ospfe.h4
-rw-r--r--usr.sbin/ospfd/rde.c4
-rw-r--r--usr.sbin/ospfd/rde_lsdb.c6
11 files changed, 28 insertions, 29 deletions
diff --git a/usr.sbin/ospfd/database.c b/usr.sbin/ospfd/database.c
index 4442d6f5eab..d94c988f7c5 100644
--- a/usr.sbin/ospfd/database.c
+++ b/usr.sbin/ospfd/database.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: database.c,v 1.2 2005/01/28 17:53:33 norby Exp $ */
+/* $OpenBSD: database.c,v 1.3 2005/02/02 19:15:07 henning Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -269,7 +269,7 @@ recv_db_description(struct nbr *nbr, char *buf, u_int16_t len)
/* event negotiation done */
nbr_fsm(nbr, NBR_EVT_NEG_DONE);
-
+
} else {
/* ignore packet */
log_debug("recv_db_description: packet ignored in "
diff --git a/usr.sbin/ospfd/interface.c b/usr.sbin/ospfd/interface.c
index f345bbb9eb2..8bbf29daaae 100644
--- a/usr.sbin/ospfd/interface.c
+++ b/usr.sbin/ospfd/interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interface.c,v 1.2 2005/01/28 17:53:33 norby Exp $ */
+/* $OpenBSD: interface.c,v 1.3 2005/02/02 19:15:07 henning Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -631,7 +631,7 @@ if_to_ctl(struct iface *iface)
gettimeofday(&now, NULL);
if (evtimer_pending(&iface->hello_timer, &tv)) {
timersub(&tv, &now, &res);
- ictl.hello_timer = res.tv_sec;
+ ictl.hello_timer = res.tv_sec;
} else
ictl.hello_timer = -1;
diff --git a/usr.sbin/ospfd/lsack.c b/usr.sbin/ospfd/lsack.c
index 46bce85c38e..85b88a009de 100644
--- a/usr.sbin/ospfd/lsack.c
+++ b/usr.sbin/ospfd/lsack.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lsack.c,v 1.2 2005/01/28 17:53:33 norby Exp $ */
+/* $OpenBSD: lsack.c,v 1.3 2005/02/02 19:15:07 henning Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
@@ -175,7 +175,7 @@ ls_ack_list_add(struct iface *iface, struct lsa_hdr *lsa)
iface->ls_ack_cnt++;
/* reschedule now if we have enough for a full packet */
- if (iface->ls_ack_cnt >
+ if (iface->ls_ack_cnt >
((iface->mtu - PACKET_HDR) / sizeof(struct lsa_hdr))) {
start_ls_ack_tx_timer_now(iface);
}
diff --git a/usr.sbin/ospfd/lsreq.c b/usr.sbin/ospfd/lsreq.c
index 34b08f1a7e8..fc3e5113673 100644
--- a/usr.sbin/ospfd/lsreq.c
+++ b/usr.sbin/ospfd/lsreq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lsreq.c,v 1.2 2005/01/28 17:53:33 norby Exp $ */
+/* $OpenBSD: lsreq.c,v 1.3 2005/02/02 19:15:07 henning Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
@@ -211,7 +211,7 @@ ls_req_tx_timer(int fd, short event, void *arg)
case NBR_STA_SNAP:
case NBR_STA_XSTRT:
case NBR_STA_XCHNG:
- return;
+ return;
case NBR_STA_LOAD:
send_ls_req(nbr);
break;
diff --git a/usr.sbin/ospfd/lsupdate.c b/usr.sbin/ospfd/lsupdate.c
index b9679aafbca..e4b9b2d3c0d 100644
--- a/usr.sbin/ospfd/lsupdate.c
+++ b/usr.sbin/ospfd/lsupdate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lsupdate.c,v 1.2 2005/01/28 17:53:33 norby Exp $ */
+/* $OpenBSD: lsupdate.c,v 1.3 2005/02/02 19:15:07 henning Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -175,7 +175,7 @@ send_ls_update(struct iface *iface, struct in_addr addr, void *data, int len)
if ((age += iface->transfer_delay) >= MAX_AGE) age = MAX_AGE;
age = ntohs(age);
memcpy(ptr, &age, sizeof(age));
-
+
ptr += len;
/* update authentication and calculate checksum */
@@ -388,7 +388,7 @@ struct lsa_ref *
lsa_cache_get(struct lsa_hdr *lsa_hdr)
{
struct lsa_ref *ref;
-
+
ref = lsa_cache_look(lsa_hdr);
if (ref)
ref->refcnt++;
@@ -401,7 +401,7 @@ lsa_cache_put(struct lsa_ref *ref, struct nbr *nbr)
{
if (--ref->refcnt > 0)
return;
-
+
if (ntohs(ref->hdr.age) >= MAX_AGE)
ospfe_imsg_compose_rde(IMSG_LS_MAXAGE, nbr->peerid, 0,
ref->data, sizeof(struct lsa_hdr));
@@ -416,7 +416,7 @@ lsa_cache_look(struct lsa_hdr *lsa_hdr)
{
struct lsa_cache_head *head;
struct lsa_ref *ref;
-
+
head = lsa_cache_hash(lsa_hdr);
LIST_FOREACH(ref, head, entry) {
if (ref->hdr.type == lsa_hdr->type &&
diff --git a/usr.sbin/ospfd/neighbor.c b/usr.sbin/ospfd/neighbor.c
index 774f8c2c7e8..c7b0e915d34 100644
--- a/usr.sbin/ospfd/neighbor.c
+++ b/usr.sbin/ospfd/neighbor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neighbor.c,v 1.3 2005/02/01 21:15:40 norby Exp $ */
+/* $OpenBSD: neighbor.c,v 1.4 2005/02/02 19:15:07 henning Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -622,7 +622,7 @@ nbr_to_ctl(struct nbr *nbr)
static struct ctl_nbr nctl;
struct timeval tv, now, res;
struct lsa_entry *le;
-
+
memcpy(nctl.name, nbr->iface->name, sizeof(nctl.name));
memcpy(&nctl.id, &nbr->id, sizeof(nctl.id));
memcpy(&nctl.addr, &nbr->iface->addr, sizeof(nctl.addr));
@@ -653,10 +653,10 @@ nbr_to_ctl(struct nbr *nbr)
gettimeofday(&now, NULL);
if (evtimer_pending(&nbr->inactivity_timer, &tv)) {
timersub(&tv, &now, &res);
- nctl.dead_timer = res.tv_sec;
+ nctl.dead_timer = res.tv_sec;
} else
nctl.dead_timer = 0;
-
+
return (&nctl);
}
diff --git a/usr.sbin/ospfd/ospfd.h b/usr.sbin/ospfd/ospfd.h
index 9c284c02533..ed7a5d4f64d 100644
--- a/usr.sbin/ospfd/ospfd.h
+++ b/usr.sbin/ospfd/ospfd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfd.h,v 1.3 2005/02/01 21:25:18 claudio Exp $ */
+/* $OpenBSD: ospfd.h,v 1.4 2005/02/02 19:15:07 henning Exp $ */
/*
* Copyright (c) 2004 Esben Norby <norby@openbsd.org>
@@ -147,7 +147,7 @@ struct area {
LIST_HEAD(, rde_nbr) nbr_list;
/* list addr_range_list; */
u_int32_t stub_default_cost;
-
+
u_int32_t dead_interval;
u_int16_t transfer_delay;
u_int16_t hello_interval;
diff --git a/usr.sbin/ospfd/ospfe.c b/usr.sbin/ospfd/ospfe.c
index 6c31a7a8de8..0da269abef8 100644
--- a/usr.sbin/ospfd/ospfe.c
+++ b/usr.sbin/ospfd/ospfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfe.c,v 1.2 2005/01/28 17:53:33 norby Exp $ */
+/* $OpenBSD: ospfe.c,v 1.3 2005/02/02 19:15:07 henning Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -697,8 +697,7 @@ ospfe_iface_ctl(struct ctl_conn *c, unsigned int idx)
if (idx == 0 || idx == iface->ifindex) {
ictl = if_to_ctl(iface);
imsg_compose(&c->ibuf, IMSG_CTL_SHOW_INTERFACE,
- 0, 0, -1,
- ictl, sizeof(struct ctl_iface));
+ 0, 0, -1, ictl, sizeof(struct ctl_iface));
}
}
diff --git a/usr.sbin/ospfd/ospfe.h b/usr.sbin/ospfd/ospfe.h
index 2b0d6c673ab..b4ac850093d 100644
--- a/usr.sbin/ospfd/ospfe.h
+++ b/usr.sbin/ospfd/ospfe.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospfe.h,v 1.2 2005/01/28 17:53:33 norby Exp $ */
+/* $OpenBSD: ospfe.h,v 1.3 2005/02/02 19:15:07 henning Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
@@ -235,7 +235,7 @@ void ls_retrans_list_free(struct nbr *, struct lsa_entry *);
void ls_retrans_list_clr(struct nbr *);
bool ls_retrans_list_empty(struct nbr *);
-void lsa_cache_init(u_int32_t);
+void lsa_cache_init(u_int32_t);
struct lsa_ref *lsa_cache_add(void *, u_int16_t);
struct lsa_ref *lsa_cache_get(struct lsa_hdr *);
void lsa_cache_put(struct lsa_ref *, struct nbr *);
diff --git a/usr.sbin/ospfd/rde.c b/usr.sbin/ospfd/rde.c
index ab9e4b8731e..2d48a1e4b2a 100644
--- a/usr.sbin/ospfd/rde.c
+++ b/usr.sbin/ospfd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.2 2005/01/28 17:53:33 norby Exp $ */
+/* $OpenBSD: rde.c,v 1.3 2005/02/02 19:15:07 henning Exp $ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
@@ -400,7 +400,7 @@ rde_dispatch_imsg(int fd, short event, void *bula)
"neighbor %s len %d", inet_ntoa(nbr->id),
imsg.hdr.len - IMSG_HEADER_SIZE);
- if (imsg.hdr.len != IMSG_HEADER_SIZE +
+ if (imsg.hdr.len != IMSG_HEADER_SIZE +
sizeof(struct lsa_hdr))
fatalx("invalid size of OE request");
memcpy(&lsa_hdr, imsg.data, sizeof(lsa_hdr));
diff --git a/usr.sbin/ospfd/rde_lsdb.c b/usr.sbin/ospfd/rde_lsdb.c
index d9ab39b85df..25ab07edda0 100644
--- a/usr.sbin/ospfd/rde_lsdb.c
+++ b/usr.sbin/ospfd/rde_lsdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_lsdb.c,v 1.1 2005/01/28 14:05:40 claudio Exp $ */
+/* $OpenBSD: rde_lsdb.c,v 1.2 2005/02/02 19:15:07 henning Exp $ */
/*
* Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org>
@@ -335,7 +335,7 @@ lsa_add(struct rde_nbr *nbr, struct lsa *lsa)
/* timeout handling either MAX_AGE or LS_REFRESH_TIME */
timerclear(&tv);
-
+
if (nbr->self)
tv.tv_sec = LS_REFRESH_TIME;
else
@@ -453,7 +453,7 @@ lsa_timeout(int fd, short event, void *bula)
struct vertex *v = bula;
lsa_age(v);
-
+
log_debug("lsa_timeout: REFLOOD");
if (v->nbr->self)