diff options
-rw-r--r-- | epan/dissectors/packet-bthci_acl.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-bthci_sco.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-isobus-vt.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-multipart.c | 5 | ||||
-rw-r--r-- | epan/dissectors/packet-obex.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-rsvp.c | 2 |
6 files changed, 11 insertions, 14 deletions
diff --git a/epan/dissectors/packet-bthci_acl.c b/epan/dissectors/packet-bthci_acl.c index 412f4f30dd..da543bc8e7 100644 --- a/epan/dissectors/packet-bthci_acl.c +++ b/epan/dissectors/packet-bthci_acl.c @@ -129,6 +129,8 @@ dissect_bthci_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat guint32 adapter_id; guint32 connection_handle; guint32 direction; + guint32 k_bd_addr_oui; + guint32 k_bd_addr_id; guint32 frame_number; remote_bdaddr_t *remote_bdaddr; const gchar *localhost_name; @@ -230,8 +232,6 @@ dissect_bthci_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat subtree = (wmem_tree_t *) wmem_tree_lookup32_array(bluetooth_data->chandle_to_bdaddr, key); remote_bdaddr = (subtree) ? (remote_bdaddr_t *) wmem_tree_lookup32_le(subtree, pinfo->num) : NULL; if (remote_bdaddr) { - guint32 k_bd_addr_oui; - guint32 k_bd_addr_id; guint32 bd_addr_oui; guint32 bd_addr_id; device_name_t *device_name; diff --git a/epan/dissectors/packet-bthci_sco.c b/epan/dissectors/packet-bthci_sco.c index c3913065a0..2982448e6e 100644 --- a/epan/dissectors/packet-bthci_sco.c +++ b/epan/dissectors/packet-bthci_sco.c @@ -64,6 +64,8 @@ dissect_bthci_sco(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat guint32 k_frame_number; guint32 k_interface_id; guint32 k_adapter_id; + guint32 k_bd_addr_oui; + guint32 k_bd_addr_id; remote_bdaddr_t *remote_bdaddr; const gchar *localhost_name; guint8 *localhost_bdaddr; @@ -142,8 +144,6 @@ dissect_bthci_sco(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat if (remote_bdaddr && remote_bdaddr->interface_id == bluetooth_data->interface_id && remote_bdaddr->adapter_id == bluetooth_data->adapter_id && remote_bdaddr->chandle == (flags & 0x0fff)) { - guint32 k_bd_addr_oui; - guint32 k_bd_addr_id; guint32 bd_addr_oui; guint32 bd_addr_id; device_name_t *device_name; diff --git a/epan/dissectors/packet-isobus-vt.c b/epan/dissectors/packet-isobus-vt.c index 6e71b6a96c..132080f1fe 100644 --- a/epan/dissectors/packet-isobus-vt.c +++ b/epan/dissectors/packet-isobus-vt.c @@ -1175,10 +1175,8 @@ dissect_vt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, enum vt_directio proto_item_append_text(ti, ": "); if (termination_cause & 0x01) - proto_item_append_text(ti, "Audio was terminated "); - - if (termination_cause & 0x01) { + proto_item_append_text(ti, "Audio was terminated "); col_append_fstr(pinfo->cinfo, COL_INFO, "VT Control audio signal termination: Audio was terminated"); } else diff --git a/epan/dissectors/packet-multipart.c b/epan/dissectors/packet-multipart.c index 10cd4fb7e4..2e2bf7f9b6 100644 --- a/epan/dissectors/packet-multipart.c +++ b/epan/dissectors/packet-multipart.c @@ -495,10 +495,7 @@ process_preamble(proto_tree *tree, tvbuff_t *tvb, multipart_info_t *m_info, } else if (boundary_start > 0) { if (boundary_line_len > 0) { gint body_part_start = boundary_start + boundary_line_len; - - if (boundary_start > 0) { - proto_tree_add_item(tree, hf_multipart_preamble, tvb, 0, boundary_start, ENC_NA); - } + proto_tree_add_item(tree, hf_multipart_preamble, tvb, 0, boundary_start, ENC_NA); proto_tree_add_item(tree, hf_multipart_first_boundary, tvb, boundary_start, boundary_line_len, ENC_NA|ENC_ASCII); return body_part_start; } diff --git a/epan/dissectors/packet-obex.c b/epan/dissectors/packet-obex.c index d63e0c6fab..2d0c25c075 100644 --- a/epan/dissectors/packet-obex.c +++ b/epan/dissectors/packet-obex.c @@ -1643,16 +1643,18 @@ dissect_obex_application_parameter_bt_ctn(tvbuff_t *tvb, packet_info *pinfo, pro item = proto_tree_add_item(parameter_tree, hf_application_parameter_length, tvb, offset, 1, ENC_BIG_ENDIAN); offset += 1; - if (parameter_id < 0x41 && parameter_id < (sizeof(required_length_map)/sizeof(gint)) && + if ((parameter_id < 0x41) && (parameter_id < (sizeof(required_length_map)/sizeof(gint))) && required_length_map[parameter_id] != -1 && required_length_map[parameter_id] != parameter_length) { + proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA); expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad, "According to the specification this parameter length should be %i, but there is %i", required_length_map[parameter_id], parameter_length); - } else if (parameter_id >= 0x41 && (guint8)(parameter_id - 0x41) < (sizeof(required_length_map_gpp)/sizeof(gint)) && + } else if ((parameter_id >= 0x41) && ((guint8)(parameter_id - 0x41) < (sizeof(required_length_map_gpp)/sizeof(gint))) && required_length_map[parameter_id - 0x41] != -1 && required_length_map[parameter_id - 0x41] != parameter_length) { + proto_tree_add_item(parameter_tree, hf_application_parameter_data, tvb, offset, parameter_length, ENC_NA); expert_add_info_format(pinfo, item, &ei_application_parameter_length_bad, "According to the specification this parameter length should be %i, but there is %i", diff --git a/epan/dissectors/packet-rsvp.c b/epan/dissectors/packet-rsvp.c index 37623bfd8f..5204179323 100644 --- a/epan/dissectors/packet-rsvp.c +++ b/epan/dissectors/packet-rsvp.c @@ -4778,7 +4778,7 @@ dissect_rsvp_label(proto_tree *ti, proto_tree *rsvp_object_tree, if(unassigned_upstream_label == 0xffffffff){ /* Unassigned upstream label, see RFC 8359 */ proto_item_append_text(ti, ": Unassigned upstream label ( 0x%x )",unassigned_upstream_label); } - else if(unassigned_upstream_label != 0xffffffff){ + else { proto_tree_add_item(rsvp_object_tree, hf_rsvp_ctype_label, tvb, offset+3, 1, ENC_BIG_ENDIAN); if (rsvp_generalized_label_option == 1) { /* FF: no generalized label interpretation */ proto_item_set_text(ti, "%s: Generalized: ", name); |