]> The Tcpdump Group git mirrors - tcpdump/commitdiff
LSP ping: Fix "Unused value" warnings from Coverity
authorFrancois-Xavier Le Bail <[email protected]>
Mon, 16 Jan 2023 19:05:20 +0000 (20:05 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Mon, 16 Jan 2023 20:15:05 +0000 (21:15 +0100)
This change should fix the following Coverity Scan issues:

CID 1397795 (#1 of 1): Unused value (UNUSED_VALUE)
assigned_pointer: Assigning value from tlv_tptr + 4UL to tlv_tptr here,
but that stored value is overwritten before it can be used.

CID 1397796 (#1 of 1): Unused value (UNUSED_VALUE)
assigned_value: Assigning value from tlv_tlen - 4UL to tlv_tlen here,
but that stored value is overwritten before it can be used.

(cherry picked from commit 98145e4ca7e59bfa5c181842c11bd41e98185152)

print-lspping.c

index 4c5fc4e8cc21a3f80c436b48e16b5d1529a59001..f3183cb29299747fc2ceb6894227292133e8f303 100644 (file)
@@ -1007,9 +1007,6 @@ lspping_print(netdissect_options *ndo,
 
             /* FIXME add hash-key type, depth limit, multipath processing */
 
-            tlv_tptr+=sizeof(struct lspping_tlv_downstream_map_info_t);
-            tlv_tlen-=sizeof(struct lspping_tlv_downstream_map_info_t);
-
             /* FIXME print downstream labels */
 
             tlv_hexdump=TRUE; /* dump the TLV until code complete */