ip6addrctl(8): Use static initializer

MFC after:	1 week
This commit is contained in:
Zhenlei Huang 2025-01-25 18:31:55 +08:00
parent 46a9fb7287
commit 7bb9ba61d3

View file

@ -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();