aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ansi_a.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2017-03-06 21:05:06 +0100
committerPeter Wu <peter@lekensteyn.nl>2017-03-12 12:10:24 +0000
commitc8020c7f6253ae606736326b41e572630c73ee59 (patch)
tree99a4a133c67182632d5a0eba83ae651f3b7c1e5b /epan/dissectors/packet-ansi_a.c
parentae39d9ad13434865ecdac5e2749d2e48cd842b97 (diff)
ansi_a: fix this condition has identical branches [-Werror=duplicated-branches] found by gcc7
All users of the ELEM_OPT_TLV and ELEM_MAND_TV macros pass an empty string ("") for the elem_name_addition parameter, so it can never be NULL. The Coverity warning was about a superfluous check (elem_name_addition[0]=='\0'). All of these checks are superfluous anyway since both branches yield an empty string. Change-Id: I28c994fd5e10c04f99c8d77e9aee18afd4a26412 Reviewed-on: https://code.wireshark.org/review/20427 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan/dissectors/packet-ansi_a.c')
-rw-r--r--epan/dissectors/packet-ansi_a.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ansi_a.c b/epan/dissectors/packet-ansi_a.c
index a8c477a21e..37823d85fb 100644
--- a/epan/dissectors/packet-ansi_a.c
+++ b/epan/dissectors/packet-ansi_a.c
@@ -7510,8 +7510,7 @@ 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, \
- /* coverity[array_null] */ \
- (elem_name_addition == NULL) ? "" : elem_name_addition \
+ elem_name_addition \
); \
} \
if (curr_len <= 0) return; \
@@ -7541,8 +7540,7 @@ 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, \
- /* coverity[array_null] */ \
- (elem_name_addition == NULL) ? "" : elem_name_addition \
+ elem_name_addition \
); \
} \
if (curr_len <= 0) return; \