diff options
author | Klement Sekera <ksekera@cisco.com> | 2021-11-18 12:32:05 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-11-22 10:21:23 +0000 |
commit | bd46907b3f27b480e5f8b0be9cb4c5b5f1fa08ab (patch) | |
tree | a09308f98ee1969c20bbced68f0bb552dd3ea2d7 | |
parent | d824aac1077cc744f66fba62879e4b668f60ed6a (diff) |
vlib: fix coverity warning
Use correct signed type to allow testing for a failure (-1) from
readlinkat().
Type: fix
Fixes: 5714a49f14
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Change-Id: I06f1c8d91e907c151012ff9758c6b52caca4d625
-rw-r--r-- | src/vlib/linux/pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vlib/linux/pci.c b/src/vlib/linux/pci.c index e049b239f48..9f0629f46bc 100644 --- a/src/vlib/linux/pci.c +++ b/src/vlib/linux/pci.c @@ -390,7 +390,7 @@ vlib_pci_get_device_root_bus (vlib_pci_addr_t *addr, vlib_pci_addr_t *root_bus) u8 *rel_path = 0, *abs_path = 0, *link_path = 0; unformat_input_t input; int fd = open (sysfs_pci_dev_path, O_RDONLY); - u32 size = 0; + ssize_t size = 0; u32 domain = 0, bus; clib_error_t *err = NULL; |