]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
output/json: Correct clang warning 5163/head
authorJeff Lucovsky <jeff@lucovsky.org>
Fri, 10 Jul 2020 12:42:37 +0000 (08:42 -0400)
committerJeff Lucovsky <jeff@lucovsky.org>
Fri, 10 Jul 2020 12:42:37 +0000 (08:42 -0400)
This commit corrects the warning for mismatched type.

src/output-json.c

index 320d12ec5037821dc290c223281ec7b3b57ea7ce..d89d6b16a59c49cf3ab2f20246b406879b0608e5 100644 (file)
@@ -1029,7 +1029,7 @@ void JsonFiveTuple(const Packet *p, enum OutputJsonLogDirection dir, json_t *js)
         json_object_set_new(js, "proto", json_string(known_proto[IP_GET_IPPROTO(p)]));
     } else {
         char proto[4];
-        snprintf(proto, sizeof(proto), "%"PRIu8"", IP_GET_IPPROTO(p));
+        snprintf(proto, sizeof(proto), "%"PRIu32"", IP_GET_IPPROTO(p));
         json_object_set_new(js, "proto", json_string(proto));
     }
 }