]> git.proxmox.com Git - mirror_frr.git/commitdiff
pimd: fix mtracebis tool warning
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Thu, 19 Jan 2023 15:09:29 +0000 (12:09 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Thu, 19 Jan 2023 15:09:29 +0000 (12:09 -0300)
Use `getpid()` to initialize the sequence number. This change silences
Coverity Scan warning about truncated use of `time()` which in this case
is not a problem.

Found by Coverity Scan (CID 1519828)

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
pimd/mtracebis_netlink.c

index 81e28f24070537e4d9ce8df2dc5a7c0ec92a8d2e..9bdf9490076ecf871d2ee6f3bb48a6333de22456 100644 (file)
@@ -92,7 +92,7 @@ int rtnl_open_byproto(struct rtnl_handle *rth, unsigned subscriptions,
                        rth->local.nl_family);
                return -1;
        }
-       rth->seq = (uint32_t)time(NULL);
+       rth->seq = getpid();
        return 0;
 }