summaryrefslogtreecommitdiff
path: root/usr.sbin/eigrpd/interface.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-09-02 16:39:45 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-09-02 16:39:45 +0000
commitdcaa3316f517f3e75debd2dc1ae2838de28a7b02 (patch)
tree1d368be1e3f0dc8ba13cabdddf40977e5448a78f /usr.sbin/eigrpd/interface.c
parent2ef6995d8b15a299fca10407d44600592771f223 (diff)
Use static local variables instead of global variables whenever possible.
Also, there's no need to zero initialize global and static variables, that's done automatically by the compiler. ok claudio@ benno@
Diffstat (limited to 'usr.sbin/eigrpd/interface.c')
-rw-r--r--usr.sbin/eigrpd/interface.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.sbin/eigrpd/interface.c b/usr.sbin/eigrpd/interface.c
index 8821919819c..e02107eefe5 100644
--- a/usr.sbin/eigrpd/interface.c
+++ b/usr.sbin/eigrpd/interface.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: interface.c,v 1.21 2016/09/02 16:34:20 renato Exp $ */
+/* $OpenBSD: interface.c,v 1.22 2016/09/02 16:39:44 renato Exp $ */
/*
* Copyright (c) 2015 Renato Westphal <renato@openbsd.org>
@@ -50,8 +50,6 @@ RB_GENERATE(iface_id_head, eigrp_iface, id_tree, iface_id_compare)
struct iface_id_head ifaces_by_id = RB_INITIALIZER(&ifaces_by_id);
-static uint32_t ifacecnt = 1;
-
struct iface *
if_new(struct eigrpd_conf *xconf, struct kif *kif)
{
@@ -294,6 +292,7 @@ eigrp_if_new(struct eigrpd_conf *xconf, struct eigrp *eigrp, struct kif *kif)
{
struct iface *iface;
struct eigrp_iface *ei;
+ static uint32_t ifacecnt = 1;
iface = if_lookup(xconf, kif->ifindex);
if (iface == NULL)