git: 7bb9ba61d357 - main - ip6addrctl(8): Use static initializer

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Sat, 25 Jan 2025 10:32:43 UTC
The branch main has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=7bb9ba61d35703c8a819c3745b8a2b1feb56923d

commit 7bb9ba61d35703c8a819c3745b8a2b1feb56923d
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2025-01-25 10:31:55 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2025-01-25 10:31:55 +0000

    ip6addrctl(8): Use static initializer
    
    MFC after:      1 week
---
 usr.sbin/ip6addrctl/ip6addrctl.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/usr.sbin/ip6addrctl/ip6addrctl.c b/usr.sbin/ip6addrctl/ip6addrctl.c
index 13413fefa8ce..146b2f1ad3e0 100644
--- a/usr.sbin/ip6addrctl/ip6addrctl.c
+++ b/usr.sbin/ip6addrctl/ip6addrctl.c
@@ -58,7 +58,7 @@ struct policyqueue {
 	struct in6_addrpolicy pc_policy;
 };
 TAILQ_HEAD(policyhead, policyqueue);
-static struct policyhead policyhead;
+static struct policyhead policyhead = TAILQ_HEAD_INITIALIZER(policyhead);
 
 static void usage(void) __dead2;
 static void get_policy(void);
@@ -75,8 +75,6 @@ static void flush_policy(void);
 int
 main(int argc, char *argv[])
 {
-	TAILQ_INIT(&policyhead);
-
 	if (argc == 1 || strcasecmp(argv[1], "show") == 0) {
 		get_policy();
 		dump_policy();