diff options
| author | Zhenlei Huang <zlei@FreeBSD.org> | 2025-03-06 04:51:45 +0000 |
|---|---|---|
| committer | Zhenlei Huang <zlei@FreeBSD.org> | 2025-03-06 04:51:45 +0000 |
| commit | 23f453ae34c29b99f892da18db44ce4292ccb7c3 (patch) | |
| tree | 42ddfc5bcfff4db9b7b33585eb1453244b3d07a8 | |
| parent | 09de37310313d87942fc5349914be46b9cb8c808 (diff) | |
vnet: Use static initializers
MFC after: 1 week
| -rw-r--r-- | sys/net/vnet.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/net/vnet.c b/sys/net/vnet.c index 94be49376adf..c64aaf9f61b5 100644 --- a/sys/net/vnet.c +++ b/sys/net/vnet.c @@ -101,7 +101,7 @@ struct sx vnet_sxlock; sx_xunlock(&vnet_sxlock); \ } while (0) -struct vnet_list_head vnet_head; +struct vnet_list_head vnet_head = LIST_HEAD_INITIALIZER(vnet_head); struct vnet *vnet0; /* @@ -318,7 +318,6 @@ vnet_init_prelink(void *arg __unused) rw_init(&vnet_rwlock, "vnet_rwlock"); sx_init(&vnet_sxlock, "vnet_sxlock"); sx_init(&vnet_sysinit_sxlock, "vnet_sysinit_sxlock"); - LIST_INIT(&vnet_head); } SYSINIT(vnet_init_prelink, SI_SUB_VNET_PRELINK, SI_ORDER_FIRST, vnet_init_prelink, NULL); |
