git: b7d5bda6f109 - main - carp: Use static initializers
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 06 Mar 2025 04:52:37 UTC
The branch main has been updated by zlei:
URL: https://cgit.FreeBSD.org/src/commit/?id=b7d5bda6f109e09d8999283a9b4e4a9668df9de9
commit b7d5bda6f109e09d8999283a9b4e4a9668df9de9
Author: Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-03-06 04:51:44 +0000
Commit: Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-03-06 04:51:44 +0000
carp: Use static initializers
MFC after: 1 week
---
sys/netinet/ip_carp.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index c01d1bdd8cff..0ead7149c1e2 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -357,7 +357,7 @@ static void carp_ifa_delroute(struct ifaddr *);
static void carp_send_ad_all(void *, int);
static void carp_demote_adj(int, char *);
-static LIST_HEAD(, carp_softc) carp_list;
+static LIST_HEAD(, carp_softc) carp_list = LIST_HEAD_INITIALIZER(carp_list);
static struct mtx carp_mtx;
static struct sx carp_sx;
static struct task carp_sendall_task =
@@ -3036,7 +3036,6 @@ carp_mod_load(void)
mtx_init(&carp_mtx, "carp_mtx", NULL, MTX_DEF);
sx_init(&carp_sx, "carp_sx");
- LIST_INIT(&carp_list);
carp_get_vhid_p = carp_get_vhid;
carp_forus_p = carp_forus;
carp_output_p = carp_output;