diff options
author | Klemens Nanni <kn@cvs.openbsd.org> | 2023-03-04 09:03:35 +0000 |
---|---|---|
committer | Klemens Nanni <kn@cvs.openbsd.org> | 2023-03-04 09:03:35 +0000 |
commit | 5caf20a6c98fb01c6116bf3182dfa36db064f3a5 (patch) | |
tree | 7661f407cdd675d9d332235da122c44b9679858f /sys | |
parent | 15c506a50ffe77babc596e7ddd1afc8b62efd262 (diff) |
properly initialise LIST head
This worked because the global head variable is zero-initialised,
but one must not rely on that.
OK mvs claudio
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/if_ether.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index eb2e56f2ec0..9fa48641cc4 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.c,v 1.256 2023/01/31 13:41:54 mvs Exp $ */ +/* $OpenBSD: if_ether.c,v 1.257 2023/03/04 09:03:34 kn Exp $ */ /* $NetBSD: if_ether.c,v 1.31 1996/05/11 12:59:58 mycroft Exp $ */ /* @@ -105,7 +105,8 @@ struct niqueue arpinq = NIQUEUE_INITIALIZER(50, NETISR_ARP); /* llinfo_arp live time, rt_llinfo and RTF_LLINFO are protected by arp_mtx */ struct mutex arp_mtx = MUTEX_INITIALIZER(IPL_SOFTNET); -LIST_HEAD(, llinfo_arp) arp_list; /* [mN] list of all llinfo_arp structures */ +LIST_HEAD(, llinfo_arp) arp_list = + LIST_HEAD_INITIALIZER(arp_list); /* [mN] list of llinfo_arp structures */ struct pool arp_pool; /* [I] pool for llinfo_arp structures */ int arp_maxtries = 5; /* [I] arp requests before set to rejected */ int la_hold_total; /* [a] packets currently in the arp queue */ |