summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-01-15 12:41:10 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-01-15 12:41:10 +0000
commitead8875a9047d57e61dafbc14a3d5a4da9346e06 (patch)
treec5f5025bda159a69915e534ef580eea84e8c6ef0 /usr.sbin
parent5b3c09374d9d177f39604e370a448ce925336710 (diff)
Minor tweaks.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/eigrpd/eigrpd.h7
-rw-r--r--usr.sbin/eigrpd/eigrpe.c6
-rw-r--r--usr.sbin/eigrpd/kroute.c4
-rw-r--r--usr.sbin/eigrpd/rde_dual.c8
-rw-r--r--usr.sbin/eigrpd/util.c6
5 files changed, 16 insertions, 15 deletions
diff --git a/usr.sbin/eigrpd/eigrpd.h b/usr.sbin/eigrpd/eigrpd.h
index dd4bc9f3fef..bf2e03293f6 100644
--- a/usr.sbin/eigrpd/eigrpd.h
+++ b/usr.sbin/eigrpd/eigrpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: eigrpd.h,v 1.7 2016/01/15 12:36:41 renato Exp $ */
+/* $OpenBSD: eigrpd.h,v 1.8 2016/01/15 12:41:09 renato Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -456,8 +456,9 @@ in_addr_t prefixlen2mask(uint8_t);
struct in6_addr *prefixlen2mask6(uint8_t);
void eigrp_applymask(int, union eigrpd_addr *,
const union eigrpd_addr *, int);
-int eigrp_addrcmp(int, union eigrpd_addr *, union eigrpd_addr *);
-int eigrp_addrisset(int, union eigrpd_addr *);
+int eigrp_addrcmp(int, const union eigrpd_addr *,
+ const union eigrpd_addr *);
+int eigrp_addrisset(int, const union eigrpd_addr *);
int eigrp_prefixcmp(int, const union eigrpd_addr *,
const union eigrpd_addr *, uint8_t);
void embedscope(struct sockaddr_in6 *);
diff --git a/usr.sbin/eigrpd/eigrpe.c b/usr.sbin/eigrpd/eigrpe.c
index 577c2191afb..a911f98d974 100644
--- a/usr.sbin/eigrpd/eigrpe.c
+++ b/usr.sbin/eigrpd/eigrpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eigrpe.c,v 1.12 2016/01/15 12:36:41 renato Exp $ */
+/* $OpenBSD: eigrpe.c,v 1.13 2016/01/15 12:41:09 renato Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -66,8 +66,8 @@ eigrpe_sig_handler(int sig, short event, void *bula)
/* eigrp engine */
pid_t
-eigrpe(struct eigrpd_conf *xconf, int pipe_parent2eigrpe[2], int pipe_eigrpe2rde[2],
- int pipe_parent2rde[2])
+eigrpe(struct eigrpd_conf *xconf, int pipe_parent2eigrpe[2],
+ int pipe_eigrpe2rde[2], int pipe_parent2rde[2])
{
struct passwd *pw;
struct event ev_sigint, ev_sigterm;
diff --git a/usr.sbin/eigrpd/kroute.c b/usr.sbin/eigrpd/kroute.c
index 7b83c96257c..f68a305b445 100644
--- a/usr.sbin/eigrpd/kroute.c
+++ b/usr.sbin/eigrpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.6 2015/10/27 03:27:35 renato Exp $ */
+/* $OpenBSD: kroute.c,v 1.7 2016/01/15 12:41:09 renato Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -550,7 +550,7 @@ struct kroute_node *
kroute_insert(struct kroute *kr)
{
struct kroute_prefix *kp;
- struct kroute_priority *kprio, *tmp = NULL;
+ struct kroute_priority *kprio, *tmp;
struct kroute_node *kn;
kp = kroute_find_prefix(kr->af, &kr->prefix, kr->prefixlen);
diff --git a/usr.sbin/eigrpd/rde_dual.c b/usr.sbin/eigrpd/rde_dual.c
index 483986d3330..c8ef7038761 100644
--- a/usr.sbin/eigrpd/rde_dual.c
+++ b/usr.sbin/eigrpd/rde_dual.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_dual.c,v 1.14 2016/01/15 12:36:41 renato Exp $ */
+/* $OpenBSD: rde_dual.c,v 1.15 2016/01/15 12:41:09 renato Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -366,7 +366,7 @@ route_composite_metric(uint8_t *kvalues, uint32_t delay, uint32_t bandwidth,
operand1 = safe_mul_uint32(kvalues[0] * EIGRP_SCALING_FACTOR,
10000000 / bandwidth);
operand2 = safe_mul_uint32(kvalues[1] * EIGRP_SCALING_FACTOR,
- 10000000 /bandwidth) / (256 - load);
+ 10000000 / bandwidth) / (256 - load);
operand3 = safe_mul_uint32(kvalues[2] * EIGRP_SCALING_FACTOR, delay);
distance = (uint64_t) operand1 + (uint64_t) operand2 +
@@ -479,7 +479,7 @@ reply_active_timer(int fd, short event, void *arg)
struct reply_node *reply = arg;
struct rde_nbr *nbr = reply->nbr;
- log_debug("%s: neighbor %s is stuck in active",
+ log_debug("%s: neighbor %s is stuck in active", __func__,
log_addr(nbr->eigrp->af, &nbr->addr));
rde_nbr_del(reply->nbr, 1);
@@ -521,7 +521,7 @@ reply_sia_timer(int fd, short event, void *arg)
&nbr->addr), log_prefix(rn));
if (reply->siaquery_sent > 0 && reply->siareply_recv == 0) {
- log_debug("%s: neighbor %s is stuck in active",
+ log_debug("%s: neighbor %s is stuck in active", __func__,
log_addr(nbr->eigrp->af, &nbr->addr));
rde_nbr_del(nbr, 1);
return;
diff --git a/usr.sbin/eigrpd/util.c b/usr.sbin/eigrpd/util.c
index 61b19652a38..dc379f3e0f9 100644
--- a/usr.sbin/eigrpd/util.c
+++ b/usr.sbin/eigrpd/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.3 2015/10/21 03:52:12 renato Exp $ */
+/* $OpenBSD: util.c,v 1.4 2016/01/15 12:41:09 renato Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -136,7 +136,7 @@ eigrp_applymask(int af, union eigrpd_addr *dest, const union eigrpd_addr *src,
}
int
-eigrp_addrcmp(int af, union eigrpd_addr *a, union eigrpd_addr *b)
+eigrp_addrcmp(int af, const union eigrpd_addr *a, const union eigrpd_addr *b)
{
switch (af) {
case AF_INET:
@@ -155,7 +155,7 @@ eigrp_addrcmp(int af, union eigrpd_addr *a, union eigrpd_addr *b)
}
int
-eigrp_addrisset(int af, union eigrpd_addr *addr)
+eigrp_addrisset(int af, const union eigrpd_addr *addr)
{
switch (af) {
case AF_UNSPEC: