diff options
Diffstat (limited to 'epan/dissectors')
-rw-r--r-- | epan/dissectors/packet-catapult-dct2000.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-kafka.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-mac-lte.c | 12 | ||||
-rw-r--r-- | epan/dissectors/packet-pdcp-lte.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-rlc-lte.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-snort.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-tftp.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-umts_fp.c | 12 |
8 files changed, 16 insertions, 25 deletions
diff --git a/epan/dissectors/packet-catapult-dct2000.c b/epan/dissectors/packet-catapult-dct2000.c index 43e640a738..83bbbcc418 100644 --- a/epan/dissectors/packet-catapult-dct2000.c +++ b/epan/dissectors/packet-catapult-dct2000.c @@ -654,7 +654,6 @@ static gboolean find_sctpprim_variant3_data_offset(tvbuff_t *tvb, int *data_offs break; case 0x0d00: /* StreamNum */ - *dest_port_offset = offset; offset += 2; break; diff --git a/epan/dissectors/packet-kafka.c b/epan/dissectors/packet-kafka.c index 0beb219692..ba9932c4da 100644 --- a/epan/dissectors/packet-kafka.c +++ b/epan/dissectors/packet-kafka.c @@ -2056,9 +2056,7 @@ dissect_kafka_metadata_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (api_version >= 8) { proto_tree_add_item(tree, hf_kafka_include_cluster_authorized_ops, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - } - if (api_version >= 8) { proto_tree_add_item(tree, hf_kafka_include_topic_authorized_ops, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; } @@ -2786,9 +2784,7 @@ dissect_kafka_fetch_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, if (api_version >= 7) { proto_tree_add_item(tree, hf_kafka_fetch_session_id, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; - } - if (api_version >= 7) { proto_tree_add_item(tree, hf_kafka_fetch_session_epoch, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; } @@ -2924,9 +2920,7 @@ dissect_kafka_fetch_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree if (api_version >= 7) { offset = dissect_kafka_error(tvb, pinfo, tree, offset); - } - if (api_version >= 7) { proto_tree_add_item(tree, hf_kafka_fetch_session_id, tvb, offset, 4, ENC_BIG_ENDIAN); offset += 4; } diff --git a/epan/dissectors/packet-mac-lte.c b/epan/dissectors/packet-mac-lte.c index 249fb91ce1..0827aa987e 100644 --- a/epan/dissectors/packet-mac-lte.c +++ b/epan/dissectors/packet-mac-lte.c @@ -6094,7 +6094,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree } else { /* There is no padding at the end of the frame */ - if (!is_truncated && (offset < p_mac_lte_info->length)) { + if (offset < p_mac_lte_info->length) { /* There is a problem if we haven't used all of the PDU */ expert_add_info_format(pinfo, pdu_ti, &ei_mac_lte_context_length, "%s PDU for UE %u is shorter than reported length (reported=%u, actual=%u)", @@ -6102,7 +6102,7 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree p_mac_lte_info->ueid, p_mac_lte_info->length, offset); } - if (!is_truncated && (offset > p_mac_lte_info->length)) { + if (offset > p_mac_lte_info->length) { /* There is a problem if the PDU is longer than reported */ expert_add_info_format(pinfo, pdu_ti, &ei_mac_lte_context_length, "%s PDU for UE %u is longer than reported length (reported=%u, actual=%u)", @@ -6526,14 +6526,14 @@ static void dissect_mch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, pro } else { /* There is no padding at the end of the frame */ - if (!is_truncated && (offset < p_mac_lte_info->length)) { + if (offset < p_mac_lte_info->length) { /* There is a problem if we haven't used all of the PDU */ expert_add_info_format(pinfo, pdu_ti, &ei_mac_lte_context_length, "PDU is shorter than reported length (reported=%u, actual=%u)", p_mac_lte_info->length, offset); } - if (!is_truncated && (offset > p_mac_lte_info->length)) { + if (offset > p_mac_lte_info->length) { /* There is a problem if the PDU is longer than reported */ expert_add_info_format(pinfo, pdu_ti, &ei_mac_lte_context_length, "PDU is longer than reported length (reported=%u, actual=%u)", @@ -6881,14 +6881,14 @@ static void dissect_slsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, } } else { /* There is no padding at the end of the frame */ - if (!is_truncated && (offset < p_mac_lte_info->length)) { + if (offset < p_mac_lte_info->length) { /* There is a problem if we haven't used all of the PDU */ expert_add_info_format(pinfo, pdu_ti, &ei_mac_lte_context_length, "SL-SCH PDU for UE %u is shorter than reported length (reported=%u, actual=%u)", p_mac_lte_info->ueid, p_mac_lte_info->length, offset); } - if (!is_truncated && (offset > p_mac_lte_info->length)) { + if (offset > p_mac_lte_info->length) { /* There is a problem if the PDU is longer than reported */ expert_add_info_format(pinfo, pdu_ti, &ei_mac_lte_context_length, "SL-SCH PDU for UE %u is longer than reported length (reported=%u, actual=%u)", diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c index 79e37b4cf5..0b02eca9e4 100644 --- a/epan/dissectors/packet-pdcp-lte.c +++ b/epan/dissectors/packet-pdcp-lte.c @@ -1932,7 +1932,7 @@ static int dissect_pdcp_lte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, /**********************************/ /* User-plane messages */ - gboolean pdu_type = (first_byte & 0x80) >> 7; + guint8 pdu_type = (first_byte & 0x80) >> 7; /* Data/Control flag */ proto_tree_add_item(pdcp_tree, hf_pdcp_lte_data_control, tvb, offset, 1, ENC_BIG_ENDIAN); diff --git a/epan/dissectors/packet-rlc-lte.c b/epan/dissectors/packet-rlc-lte.c index d673a56c11..1556ef129a 100644 --- a/epan/dissectors/packet-rlc-lte.c +++ b/epan/dissectors/packet-rlc-lte.c @@ -2449,7 +2449,7 @@ static void dissect_rlc_lte_am_status_pdu(tvbuff_t *tvb, /* Reset this flag here */ e2 = 0; } - } while (e1 || e2); + } while (e1); if (nack_count > 0) { proto_item *count_ti = proto_tree_add_uint(tree, hf_rlc_lte_am_nacks, tvb, 0, 1, nack_count); diff --git a/epan/dissectors/packet-snort.c b/epan/dissectors/packet-snort.c index 5a9985c42e..8b6158adbb 100644 --- a/epan/dissectors/packet-snort.c +++ b/epan/dissectors/packet-snort.c @@ -898,7 +898,7 @@ static void snort_show_alert(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo unsigned int converted_content_length = 0; int content_hf_item; char *content_text_template; - gboolean attempt_match; + gboolean attempt_match = FALSE; /* Choose type of content field to add */ switch (rule->contents[n].content_type) { @@ -1275,10 +1275,10 @@ static void snort_start(void) return; } + /* Don't start if already running */ if (current_session.running) { return; } - current_session.running = FALSE; /* Reset global stats */ reset_global_rule_stats(g_snort_config); diff --git a/epan/dissectors/packet-tftp.c b/epan/dissectors/packet-tftp.c index 99d3422c25..eb9e1f6e40 100644 --- a/epan/dissectors/packet-tftp.c +++ b/epan/dissectors/packet-tftp.c @@ -218,7 +218,7 @@ tftp_eo_packet(void *tapdata, packet_info *pinfo, epan_dissect_t *edt _U_, const /* Free up unnecessary memory */ g_free(eo_info->filename); - /* Pass out the contigous data and length already accumulated. */ + /* Pass out the contiguous data and length already accumulated. */ entry->payload_len = eo_info->payload_len; entry->payload_data = eo_info->payload_data; diff --git a/epan/dissectors/packet-umts_fp.c b/epan/dissectors/packet-umts_fp.c index 324868abfb..72d382682e 100644 --- a/epan/dissectors/packet-umts_fp.c +++ b/epan/dissectors/packet-umts_fp.c @@ -3549,9 +3549,8 @@ dissect_hsdsch_type_2_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree } } - if (header_length == 0) { - header_length = offset; - } + header_length = offset; + /**********************************************/ /* Optional fields indicated by earlier flags */ if (drt_present) { @@ -3812,9 +3811,8 @@ void dissect_hsdsch_common_channel_info(tvbuff_t *tvb, packet_info *pinfo, proto offset - block_header_start_offset); } } - if (header_length == 0) { - header_length = offset; - } + + header_length = offset; /**********************************************/ /* Optional fields indicated by earlier flags */ @@ -4938,7 +4936,7 @@ heur_dissect_fp_hsdsch_type_2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre return FALSE; } - captured_length = tvb_reported_length(tvb); + captured_length = tvb_captured_length(tvb); reported_length = tvb_reported_length(tvb); /* Lengths limit: header size + at least 1 PDU Block Header + CRC Payload size */ if (captured_length < 11) { |