summaryrefslogtreecommitdiff
path: root/epan/dissectors/packet-e212.c
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2013-08-30 14:49:55 +0000
committerPascal Quantin <pascal.quantin@gmail.com>2013-08-30 14:49:55 +0000
commit84bf0acc0035cb284e8afcfb51ac7171eafc25ef (patch)
treed467f44d9e8986593c53be452b53bc5f878971d8 /epan/dissectors/packet-e212.c
parentac5619426a416f523bd193413f43c3360b37bd9c (diff)
downloadwireshark-84bf0acc0035cb284e8afcfb51ac7171eafc25ef.tar.gz
Convert a few dissectors from EMEM to WMEM API
svn path=/trunk/; revision=51597
Diffstat (limited to 'epan/dissectors/packet-e212.c')
-rw-r--r--epan/dissectors/packet-e212.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/epan/dissectors/packet-e212.c b/epan/dissectors/packet-e212.c
index f8da33f695..e9401f49ef 100644
--- a/epan/dissectors/packet-e212.c
+++ b/epan/dissectors/packet-e212.c
@@ -33,6 +33,7 @@
#include <glib.h>
#include <epan/packet.h>
+#include <epan/wmem/wmem.h>
#include "packet-e212.h"
#include "expert.h"
@@ -2499,10 +2500,10 @@ static expert_field ei_E212_mnc_non_decimal = EI_INIT;
*/
/*
- * Return MCC MNC in a ep allocated string that can be used in labels.
+ * Return MCC MNC in a packet scope allocated string that can be used in labels.
*/
gchar *
-dissect_e212_mcc_mnc_ep_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian)
+dissect_e212_mcc_mnc_packet_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian)
{
int start_offset, mcc_mnc;
@@ -2551,7 +2552,7 @@ dissect_e212_mcc_mnc_ep_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Prepare a string with the MCC and MNC including the country and Operator if
* known, do NOT print unknown.
*/
- mcc_mnc_str = ep_strdup_printf("MCC %u %s, MNC %03u %s",
+ mcc_mnc_str = wmem_strdup_printf(wmem_packet_scope(), "MCC %u %s, MNC %03u %s",
mcc,
val_to_str_ext_const(mcc,&E212_codes_ext,""),
mnc,
@@ -2564,7 +2565,7 @@ dissect_e212_mcc_mnc_ep_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
/* Prepare a string with the MCC and MNC including the country and Operator if
* known, do NOT print unknown.
*/
- mcc_mnc_str = ep_strdup_printf("MCC %u %s, MNC %02u %s",
+ mcc_mnc_str = wmem_strdup_printf(wmem_packet_scope(), "MCC %u %s, MNC %02u %s",
mcc,
val_to_str_ext_const(mcc,&E212_codes_ext,""),
mnc,
@@ -2580,7 +2581,7 @@ dissect_e212_mcc_mnc_ep_str(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
int
dissect_e212_mcc_mnc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, gboolean little_endian)
{
- dissect_e212_mcc_mnc_ep_str(tvb, pinfo, tree, offset, little_endian);
+ dissect_e212_mcc_mnc_packet_str(tvb, pinfo, tree, offset, little_endian);
return offset +3;
}