aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-p_mul.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2009-08-05 19:03:48 +0000
committerGerald Combs <gerald@wireshark.org>2009-08-05 19:03:48 +0000
commit595f9b66307feaa3d74f8dccadb56b7d87e6cf21 (patch)
tree652b6674a2f48b449d1112b005d903cc37178aaa /epan/dissectors/packet-p_mul.c
parentb5aa261da690fa7c0185b30c5e6ddc37a3f8550f (diff)
Convert a GString to an ep_strbuf_t (and squelch a static analysis
warning in the process). Remove an unused variable. svn path=/trunk/; revision=29308
Diffstat (limited to 'epan/dissectors/packet-p_mul.c')
-rw-r--r--epan/dissectors/packet-p_mul.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/epan/dissectors/packet-p_mul.c b/epan/dissectors/packet-p_mul.c
index d3cbbc4a8d..5747e0d655 100644
--- a/epan/dissectors/packet-p_mul.c
+++ b/epan/dissectors/packet-p_mul.c
@@ -788,7 +788,6 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
proto_tree *p_mul_tree = NULL, *field_tree = NULL, *checksum_tree = NULL;
proto_item *ti = NULL, *en = NULL, *len_en = NULL;
- p_mul_seq_val *pkg_data = NULL;
gboolean save_fragmented;
fragment_data *frag_msg = NULL;
guint32 message_id = 0, ip;
@@ -797,7 +796,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
guint8 pdu_type = 0, *value = NULL, map = 0, fec_len;
gint i, tot_no_missing = 0, no_missing = 0, offset = 0;
address src, dst;
- GString *message_id_list = NULL;
+ emem_strbuf_t *message_id_list = NULL;
nstime_t ts;
col_set_str (pinfo->cinfo, COL_PROTOCOL, "P_MUL");
@@ -1063,7 +1062,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
case Ack_PDU:
if (check_col (pinfo->cinfo, COL_INFO)) {
- message_id_list = g_string_new ("");
+ message_id_list = ep_strbuf_new_label("");
}
for (i = 0; i < count; i++) {
/* Ack Info Entry */
@@ -1109,9 +1108,9 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (check_col (pinfo->cinfo, COL_INFO)) {
if (i == 0) {
- g_string_printf (message_id_list, "%u", message_id);
+ ep_strbuf_printf (message_id_list, "%u", message_id);
} else {
- g_string_append_printf (message_id_list, ",%u", message_id);
+ ep_strbuf_append_printf (message_id_list, ",%u", message_id);
}
}
@@ -1235,7 +1234,7 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (use_seq_ack_analysis && (pdu_type <= Discard_Message_PDU) &&
(pdu_type != Ack_PDU) && (pdu_type != Address_PDU || no_dest != 0))
{
- pkg_data = add_seq_analysis (tvb, pinfo, p_mul_tree, &src, offset, pdu_type,
+ add_seq_analysis (tvb, pinfo, p_mul_tree, &src, offset, pdu_type,
message_id, seq_no, tot_no_missing);
}
@@ -1267,10 +1266,9 @@ static void dissect_p_mul (tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (pdu_type != Ack_PDU) {
col_append_fstr (pinfo->cinfo, COL_INFO, ", MSID: %u", message_id);
} else {
- if (count > 0) {
+ if (message_id_list && message_id_list->len > 0) {
col_append_fstr (pinfo->cinfo, COL_INFO, ", MSID: %s", message_id_list->str);
}
- g_string_free (message_id_list, TRUE);
}
}