summaryrefslogtreecommitdiffstats
path: root/usr.sbin/eigrpd/interface.c
diff options
context:
space:
mode:
authorrenato <renato@openbsd.org>2016-09-02 16:39:44 +0000
committerrenato <renato@openbsd.org>2016-09-02 16:39:44 +0000
commit5425f012d562fd18dc3635b6f6b2880a77f33800 (patch)
tree9a081b342eae6cdeda65439920359dd092bd6eb0 /usr.sbin/eigrpd/interface.c
parentMerge the recv_packet_v[46] functions into one. (diff)
downloadwireguard-openbsd-5425f012d562fd18dc3635b6f6b2880a77f33800.tar.xz
wireguard-openbsd-5425f012d562fd18dc3635b6f6b2880a77f33800.zip
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)