forked from osmocom/wireshark
ANSI_A: Rationalize test expession (CID-1372216 ... 1372267)
Implement the same changes in the ELEM_TLV() and ELEM_TV() macros as in packet-gsm_a_common.h, to remove superfluous code and squelch about 50 Coverity issues. Change-Id: I262dc60fdfa3482876d8525b34f6b1dbbe371257 Reviewed-on: https://code.wireshark.org/review/17478 Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
7c7497a77e
commit
668e6bc831
|
@ -7510,7 +7510,8 @@ elem_v(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, elem_idx_t idx, guin
|
|||
"Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
|
||||
ansi_a_elem_1_strings[elem_idx].value, \
|
||||
ansi_a_elem_1_strings[elem_idx].strptr, \
|
||||
(elem_name_addition == NULL) || (elem_name_addition[0] == '\0') ? "" : elem_name_addition \
|
||||
/* coverity[array_null] */ \
|
||||
(elem_name_addition == NULL) ? "" : elem_name_addition \
|
||||
); \
|
||||
} \
|
||||
if (curr_len <= 0) return; \
|
||||
|
@ -7540,7 +7541,8 @@ elem_v(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, elem_idx_t idx, guin
|
|||
"Missing Mandatory element (0x%02x) %s%s, rest of dissection is suspect", \
|
||||
ansi_a_elem_1_strings[elem_idx].value, \
|
||||
ansi_a_elem_1_strings[elem_idx].strptr, \
|
||||
(elem_name_addition == NULL) || (elem_name_addition[0] == '\0') ? "" : elem_name_addition \
|
||||
/* coverity[array_null] */ \
|
||||
(elem_name_addition == NULL) ? "" : elem_name_addition \
|
||||
); \
|
||||
} \
|
||||
if (curr_len <= 0) return; \
|
||||
|
|
Loading…
Reference in New Issue