aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-frame.c2
-rw-r--r--epan/dissectors/packet-gsm_sms.c15
-rw-r--r--epan/dissectors/packet-isobus-vt.c3
-rw-r--r--extcap/androiddump.c12
-rw-r--r--ui/qt/models/packet_list_model.cpp2
-rw-r--r--ui/voip_calls.c8
6 files changed, 18 insertions, 24 deletions
diff --git a/epan/dissectors/packet-frame.c b/epan/dissectors/packet-frame.c
index 81b67f8006..7fdd8924a6 100644
--- a/epan/dissectors/packet-frame.c
+++ b/epan/dissectors/packet-frame.c
@@ -815,7 +815,7 @@ dissect_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void*
g_log(LOG_DOMAIN_CAPTURE, G_LOG_LEVEL_WARNING,
"Dissector %s incomplete in frame %u: undecoded byte number %u "
"(0x%.4X+%u)",
- (fi ? fi->hfinfo->abbrev : "[unknown]"),
+ fi->hfinfo->abbrev,
pinfo->num, i, i - i % 16, i % 16);
ensure_tree_item(tree, 1);
proto_tree_add_expert_format(tree, pinfo, &ei_incomplete, tvb, i, 1, "Undecoded byte number: %u (0x%.4X+%u)", i, i - i % 16, i % 16);
diff --git a/epan/dissectors/packet-gsm_sms.c b/epan/dissectors/packet-gsm_sms.c
index d0d60908a7..635d136e15 100644
--- a/epan/dissectors/packet-gsm_sms.c
+++ b/epan/dissectors/packet-gsm_sms.c
@@ -2683,9 +2683,13 @@ dis_msg_status_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
{
return;
}
- pi = tvb_get_guint8(tvb, offset);
+ /* Read Parameter Indicator byte */
+ pi = tvb_get_guint8(tvb, offset);
dis_field_pi(tvb, tree, offset);
+ offset++;
+
+ /* TODO: (9.2.3.27) If a Reserved bit is set to "1" then the receiving entity shall ignore the setting */
if (pi & 0x01)
{
@@ -2696,10 +2700,9 @@ dis_msg_status_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
return;
}
- offset++;
oct = tvb_get_guint8(tvb, offset);
-
dis_field_pid(tvb, tree, offset, oct);
+ offset++;
}
if (pi & 0x02)
@@ -2711,10 +2714,9 @@ dis_msg_status_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
return;
}
- offset++;
oct = tvb_get_guint8(tvb, offset);
-
dis_field_dcs(tvb, tree, offset, oct, &seven_bit, &eight_bit, &ucs2, &compressed);
+ offset++;
}
if (pi & 0x04)
@@ -2726,7 +2728,6 @@ dis_msg_status_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
return;
}
- offset++;
oct = tvb_get_guint8(tvb, offset);
udl = oct;
@@ -2735,8 +2736,6 @@ dis_msg_status_report(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint
if (udl > 0)
{
- offset++;
-
dis_field_ud(tvb, pinfo, tree, offset, length - (offset - saved_offset), udhi, udl,
seven_bit, eight_bit, ucs2, compressed, data);
}
diff --git a/epan/dissectors/packet-isobus-vt.c b/epan/dissectors/packet-isobus-vt.c
index 77c2910185..0be6425668 100644
--- a/epan/dissectors/packet-isobus-vt.c
+++ b/epan/dissectors/packet-isobus-vt.c
@@ -1956,7 +1956,8 @@ dissect_vt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, enum vt_directio
proto_item_append_text(ti, ": ");
if (error_codes & 0x01)
proto_item_append_text(ti, "Audio device is busy, subsequent commands use the new setting ");
- if (error_codes & 0x01)
+ /* TODO: Haven't confirmed this bit against spec, but was previously wrongly also 0x01 */
+ if (error_codes & 0x02)
proto_item_append_text(ti, "Command is not supported ");
if (error_codes & 0x10)
proto_item_append_text(ti, "Any other error ");
diff --git a/extcap/androiddump.c b/extcap/androiddump.c
index d3535d72f0..91c9f8093c 100644
--- a/extcap/androiddump.c
+++ b/extcap/androiddump.c
@@ -1234,7 +1234,7 @@ static int register_interfaces(extcap_parameters * extcap_conf, const char *adb_
response[data_length] = '\0';
data_str = strtok(response, "\n");
while (data_str != NULL) {
- if (data_str && sscanf(data_str, "%*s %15s", pid) == 1 && strlen(pid) > 10 && strcmp(pid + 9, "22A8") == 0) {
+ if (sscanf(data_str, "%*s %15s", pid) == 1 && strlen(pid) > 10 && strcmp(pid + 9, "22A8") == 0) {
g_debug("Btsnoop Net Port for %s is %s", serial_number, pid + 9);
break;
}
@@ -1562,7 +1562,7 @@ static int capture_android_bluetooth_hcidump(char *interface, char *fifo,
frame_length = raw_length * 3 + (raw_length / 20) * 4 + ((raw_length % 20) ? 2 : -2) + 29;
- if (used_buffer_length + length < frame_length) {
+ if ((used_buffer_length + length) < frame_length) {
used_buffer_length += length;
break;
}
@@ -1600,12 +1600,8 @@ static int capture_android_bluetooth_hcidump(char *interface, char *fifo,
ts,
ms * 1000);
- if (used_buffer_length + length >= frame_length) {
- memmove(data, data + frame_length, (size_t)(used_buffer_length + length - frame_length));
- used_buffer_length = (gssize)(used_buffer_length + length - frame_length);
- length = 0;
- continue;
- }
+ memmove(data, data + frame_length, (size_t)(used_buffer_length + length - frame_length));
+ used_buffer_length = (gssize)(used_buffer_length + length - frame_length);
length = 0;
}
}
diff --git a/ui/qt/models/packet_list_model.cpp b/ui/qt/models/packet_list_model.cpp
index 9d1396f90e..12d057e0fd 100644
--- a/ui/qt/models/packet_list_model.cpp
+++ b/ui/qt/models/packet_list_model.cpp
@@ -494,7 +494,7 @@ bool PacketListModel::recordLessThan(PacketListRecord *r1, PacketListRecord *r2)
// either r1 is invalid (and sort it before others) or both
// r1 and r2 are valid (sort normally)
cmp_val = -1;
- } else if (!ok_r2 || (ok_r1 && num_r1 > num_r2)) {
+ } else if (!ok_r2 || (num_r1 > num_r2)) {
cmp_val = 1;
}
} else {
diff --git a/ui/voip_calls.c b/ui/voip_calls.c
index 737c1f3983..8613411035 100644
--- a/ui/voip_calls.c
+++ b/ui/voip_calls.c
@@ -1442,9 +1442,7 @@ isup_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
tapinfo->completed_calls++;
}
/* Overwrite any comment set above */
- if (comment) {
- g_free(comment);
- }
+ g_free(comment);
comment = g_strdup_printf("Cause %i - %s",
pi->cause_value,
val_to_str_ext_const(pi->cause_value, &q931_cause_code_vals_ext, "(Unknown)"));
@@ -3655,7 +3653,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
} else if(pi->stream_connect == 1 && callsinfo == NULL) {
/* Research indicates some nortel products initiate stream first
- * without keypresses. therefore creating this solely on a keypress is
+ * without keypresses, therefore creating this solely on a keypress is
* ineffective.
* Sometimes calls start immediately with open stream.
*/
@@ -3679,7 +3677,7 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
/* Clear tap struct */
tmp_unistim_info->rudp_type = 0;
tmp_unistim_info->payload_type = 0;
- tmp_unistim_info->sequence = pi->sequence;
+ tmp_unistim_info->sequence = 0;
tmp_unistim_info->termid = 0;
tmp_unistim_info->key_val = -1;
tmp_unistim_info->key_state = -1;