]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: initialize prefix value in Auto-RP
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 16 Oct 2024 10:43:52 +0000 (12:43 +0200)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 16 Oct 2024 11:30:25 +0000 (13:30 +0200)
clang-SA complains that it's only partially initialized (because it's
used with IPv4 only).  The code later calls some AF-generic code,
prompting clang-SA to complain that the non-IPv4 parts are used without
being set.  While this shouldn't happen, just initialize it fully.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
pimd/pim_autorp.c

index 35347a2790c869b88c323a4f0416e96fe8d7aa0e..3fc30347a63c7a71ed971b07f762b2732881c66a 100644 (file)
@@ -308,7 +308,7 @@ static bool pim_autorp_discovery(struct pim_autorp *autorp, uint8_t rpcnt,
        struct autorp_pkt_grp *grp;
        size_t offset = 0;
        pim_addr rp_addr;
-       struct prefix grppfix;
+       struct prefix grppfix = {};
        char plname[32];
        struct prefix_list *pl;
        struct prefix_list_entry *ple;