From d8145114e0be94ee634743d696112a80826094ea Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Thu, 19 Jan 2023 12:09:29 -0300 Subject: [PATCH] pimd: fix mtracebis tool warning 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 --- pimd/mtracebis_netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pimd/mtracebis_netlink.c b/pimd/mtracebis_netlink.c index 81e28f2407..9bdf949007 100644 --- a/pimd/mtracebis_netlink.c +++ b/pimd/mtracebis_netlink.c @@ -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; } -- 2.39.5