From: Michal Privoznik <mpriv...@redhat.com>

Inside of findMACsFromJSON(), the retval of
json_object_array_length() is stored in a variable that's type of
int. But the function is declared to return size_t:

  /usr/include/json-c/json_object.h:JSON_EXPORT size_t 
json_object_array_length(const struct json_object *obj);

Fix the type of the local variable.

Signed-off-by: Michal Privoznik <mpriv...@redhat.com>
---
 tools/nss/libvirt_nss_macs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/nss/libvirt_nss_macs.c b/tools/nss/libvirt_nss_macs.c
index c3af9375bc..44544624f3 100644
--- a/tools/nss/libvirt_nss_macs.c
+++ b/tools/nss/libvirt_nss_macs.c
@@ -46,7 +46,7 @@ findMACsFromJSON(json_object *jobj,
                  size_t *nmacs)
 {
     size_t i;
-    int len;
+    size_t len;
 
     if (!json_object_is_type(jobj, json_type_array)) {
         ERROR("parsed JSON does not contain the leases array");
-- 
2.49.0

Reply via email to