]> The Tcpdump Group git mirrors - tcpdump/commitdiff
RSVP: Make a constant unsigned
authorFrancois-Xavier Le Bail <[email protected]>
Wed, 1 Jul 2020 09:16:29 +0000 (11:16 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Wed, 1 Jul 2020 09:28:50 +0000 (11:28 +0200)
This change avoids:
print-rsvp.c:1205:40: runtime error: implicit conversion from type 'int'
of value -8 (32-bit, signed) to type 'unsigned int' changed the value
to 4294967288 (32-bit, unsigned)
    #0 0x848e20f in rsvp_obj_print ./print-rsvp.c:1205:40

print-rsvp.c

index ea6ccfd7cca434f24b2ecdee90e178b035548eb8..e7754d329eae3af857334d9d08efa00ffcfb19e1 100644 (file)
@@ -341,7 +341,7 @@ struct rsvp_obj_frr_t {
 #define RSVP_OBJ_XRO_MASK_SUBOBJ(x)   ((x)&0x7f)
 #define RSVP_OBJ_XRO_MASK_LOOSE(x)    ((x)&0x80)
 
-#define RSVP_OBJ_CAPABILITY_FLAGS_MASK  0x7
+#define RSVP_OBJ_CAPABILITY_FLAGS_MASK  0x7U
 
 #define        RSVP_OBJ_XRO_RES       0
 #define        RSVP_OBJ_XRO_IPV4      1