From: Francois-Xavier Le Bail Date: Mon, 16 Jan 2023 19:05:20 +0000 (+0100) Subject: LSP ping: Fix "Unused value" warnings from Coverity X-Git-Tag: tcpdump-4.99.4~28 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/25a5bc3ec9bc78dfd6611948499591372ea48a75 LSP ping: Fix "Unused value" warnings from Coverity 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) --- diff --git a/print-lspping.c b/print-lspping.c index 4c5fc4e8..f3183cb2 100644 --- a/print-lspping.c +++ b/print-lspping.c @@ -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 */