aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Mathieson <martin.r.mathieson@googlemail.com>2015-11-08 07:07:10 -0800
committerMartin Mathieson <martin.r.mathieson@googlemail.com>2015-11-08 15:08:48 +0000
commit44644ed4e1ad7c1fadc540dbf8c3a9241a8603fc (patch)
tree3f5ccaf3d5a3fc1970adee9ed818e843275c274e
parent5c2ab828700692bf97d7eee1de86d1793c3c6a74 (diff)
DCT2000: eliminate dead code return from function (CID 1158885)
Change-Id: I622f048581dfcc4b49315a5ef45aa44499c6e096 Reviewed-on: https://code.wireshark.org/review/11639 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
-rw-r--r--epan/dissectors/packet-catapult-dct2000.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/epan/dissectors/packet-catapult-dct2000.c b/epan/dissectors/packet-catapult-dct2000.c
index b76be71111..0952691690 100644
--- a/epan/dissectors/packet-catapult-dct2000.c
+++ b/epan/dissectors/packet-catapult-dct2000.c
@@ -505,6 +505,7 @@ static gboolean find_sctpprim_variant1_data_offset(tvbuff_t *tvb, int *data_offs
}
/* Look for the protocol data within an sctpprim (variant 3) packet.
+ Return value indicates whether this header found.
Only set *data_offset if data field found. */
static gboolean find_sctpprim_variant3_data_offset(tvbuff_t *tvb, int *data_offset,
guint32 *dest_addr_offset,
@@ -520,12 +521,8 @@ static gboolean find_sctpprim_variant3_data_offset(tvbuff_t *tvb, int *data_offs
offset += 2;
/* Only interested in data requests or indications */
- switch (top_tag) {
- case 0x0400: /* SendDataReq */
- case 0x6200: /* DataInd */
- break;
-
- default:
+ switch ((top_tag != 0x0400) && /* SendDataReq */
+ (top_tag != 0x6200)) { /* DataInd */
return FALSE;
}
@@ -592,9 +589,9 @@ static gboolean find_sctpprim_variant3_data_offset(tvbuff_t *tvb, int *data_offs
}
}
- /***************/
- /* SendDataReq */
- else if (top_tag == 0x0400) {
+ /***********************************/
+ /* SendDataReq (top_tag == 0x0400) */
+ else {
/* AssociateId should follow - check tag */
tag = tvb_get_ntohs(tvb, offset);
if (tag != 0x2400) {
@@ -688,8 +685,6 @@ static gboolean find_sctpprim_variant3_data_offset(tvbuff_t *tvb, int *data_offs
return FALSE;
}
}
-
- return FALSE;
}