aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorMichael Tüxen <tuexen@wireshark.org>2015-12-05 14:43:11 +0100
committerMichael Mann <mmann78@netscape.net>2015-12-06 02:59:50 +0000
commitd382c7d321642dae8f25e4257da644d87b645c65 (patch)
tree01a76afff1d276056fb30854d9a064bd01306b04 /epan
parent4348d4dd34d0efaa5eb9e42969243a309b7115de (diff)
SCTP: It is odd that the body of dissect_heartbeat_ack_chunk' function is fully equivalent to the body of 'dissect_heartbeat_chunk' function found by PVS Studio (V524)
This is just a cosmetic change, which makes sense. No funtional change. Change-Id: Id24d162379093207863608e70f405e66f789276c Reviewed-on: https://code.wireshark.org/review/12440 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Tüxen Reviewed-by: Michael Tüxen <tuexen@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-sctp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/epan/dissectors/packet-sctp.c b/epan/dissectors/packet-sctp.c
index 13f24593aa..19da2577ff 100644
--- a/epan/dissectors/packet-sctp.c
+++ b/epan/dissectors/packet-sctp.c
@@ -3927,6 +3927,8 @@ dissect_heartbeat_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *
}
}
+#define HEARTBEAT_ACK_CHUNK_INFO_OFFSET CHUNK_VALUE_OFFSET
+
static void
dissect_heartbeat_ack_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_info *pinfo, proto_tree *chunk_tree, proto_item *chunk_item)
{
@@ -3934,9 +3936,9 @@ dissect_heartbeat_ack_chunk(tvbuff_t *chunk_tvb, guint16 chunk_length, packet_in
if (chunk_tree) {
proto_item_append_text(chunk_item, " (Information: %u byte%s)", chunk_length - CHUNK_HEADER_LENGTH, plurality(chunk_length - CHUNK_HEADER_LENGTH, "", "s"));
- parameter_tvb = tvb_new_subset(chunk_tvb, HEARTBEAT_CHUNK_INFO_OFFSET,
- MIN(chunk_length - CHUNK_HEADER_LENGTH, tvb_captured_length_remaining(chunk_tvb, HEARTBEAT_CHUNK_INFO_OFFSET)),
- MIN(chunk_length - CHUNK_HEADER_LENGTH, tvb_reported_length_remaining(chunk_tvb, HEARTBEAT_CHUNK_INFO_OFFSET)));
+ parameter_tvb = tvb_new_subset(chunk_tvb, HEARTBEAT_ACK_CHUNK_INFO_OFFSET,
+ MIN(chunk_length - CHUNK_HEADER_LENGTH, tvb_captured_length_remaining(chunk_tvb, HEARTBEAT_ACK_CHUNK_INFO_OFFSET)),
+ MIN(chunk_length - CHUNK_HEADER_LENGTH, tvb_reported_length_remaining(chunk_tvb, HEARTBEAT_ACK_CHUNK_INFO_OFFSET)));
/* FIXME: Parameters or parameter? */
dissect_parameter(parameter_tvb, pinfo, chunk_tree, NULL, FALSE, TRUE);
}