]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nwfilter: use time_t for timeout for consistency
authorShaleen Bathla <shaleen.bathla@oracle.com>
Wed, 28 Dec 2022 14:47:12 +0000 (20:17 +0530)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 6 Jan 2023 11:51:09 +0000 (12:51 +0100)
commit0d278aa089bf3a00bf2d6e56d2f01ea4677190a7
tree271d06e2793fe913511eeed9ad3fdfcf64ca35db
parentd45ee63b90dc452846268a50d89c557453768f17
nwfilter: use time_t for timeout for consistency

Coverity scan reports:
"A time_t value is stored in an integer with too few bits to accommodate
it. The expression timeout is cast to unsigned int"

We are already casting and storing time_t timeout variable into unsigned int.
We can use time_t for timeout and cast it to unsigned long (should be big enough)
instead of unsigned int in sscanf, g_strdup_printf as required.

Signed-off-by: Shaleen Bathla <shaleen.bathla@oracle.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/nwfilter/nwfilter_dhcpsnoop.c