aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2021-12-18 18:48:20 +0000
committerJoão Valverde <j@v6e.pt>2021-12-19 21:21:58 +0000
commit0ccd69e530ed18ac19a4484c76bdbef94d1ab2b1 (patch)
treeffb5f202b47fbead8ff87e573afd72c856c91ae0 /plugins
parentf984def50cfb20c5a47f7ac41b7b72bd270f2bb7 (diff)
Replace g_strdup_printf() with ws_strdup_printf()
Use macros from inttypes.h.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/epan/mate/mate_grammar.lemon2
-rw-r--r--plugins/epan/mate/mate_setup.c82
-rw-r--r--plugins/epan/mate/mate_util.c6
-rw-r--r--plugins/epan/mate/mate_util.h2
-rw-r--r--plugins/epan/pluginifdemo/pluginifdemo.c10
-rw-r--r--plugins/epan/profinet/packet-dcerpc-pn-io.c6
-rw-r--r--plugins/epan/profinet/packet-dcom-cba-acco.c8
-rw-r--r--plugins/epan/stats_tree/pinfo_stats_tree.c2
-rw-r--r--plugins/epan/wimaxasncp/packet-wimaxasncp.c2
-rw-r--r--plugins/epan/wimaxasncp/wimaxasncp_dict.l4
-rw-r--r--plugins/wiretap/usbdump/usbdump.c4
11 files changed, 64 insertions, 64 deletions
diff --git a/plugins/epan/mate/mate_grammar.lemon b/plugins/epan/mate/mate_grammar.lemon
index ef8289ea8f..1a95b4db2c 100644
--- a/plugins/epan/mate/mate_grammar.lemon
+++ b/plugins/epan/mate/mate_grammar.lemon
@@ -710,7 +710,7 @@ avp(A) ::= NAME(B) AVP_OPERATOR(C) value(D). { A = new_avp(B,D,*C); }
avp(A) ::= NAME(B). { A = new_avp(B,"",'?'); }
avp(A) ::= NAME(B) OPEN_BRACE avp_oneoff(C) CLOSE_BRACE. { A = new_avp(B,C,'|'); }
-avp_oneoff(A) ::= avp_oneoff(B) PIPE value(C). { A = g_strdup_printf("%s|%s",B,C); }
+avp_oneoff(A) ::= avp_oneoff(B) PIPE value(C). { A = ws_strdup_printf("%s|%s",B,C); }
avp_oneoff(A) ::= value(B). { A = g_strdup(B); }
value(A) ::= QUOTED(B). { A = g_strdup(B); }
diff --git a/plugins/epan/mate/mate_setup.c b/plugins/epan/mate/mate_setup.c
index 3f88abbd2d..eef9764389 100644
--- a/plugins/epan/mate/mate_setup.c
+++ b/plugins/epan/mate/mate_setup.c
@@ -196,7 +196,7 @@ extern gchar* add_ranges(mate_config* mc, gchar* range,GPtrArray* range_ptr_arr)
g_ptr_array_add(range_ptr_arr,(gpointer)hfidp);
} else {
g_strfreev(ranges);
- return g_strdup_printf("no such proto: '%s'",ranges[i]);
+ return ws_strdup_printf("no such proto: '%s'",ranges[i]);
}
}
@@ -215,12 +215,12 @@ static void new_attr_hfri(mate_config* mc, gchar* item_name, GHashTable* hfids,
*p_id = -1;
hfri.p_id = p_id;
hfri.hfinfo.name = g_strdup(name);
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.%s",item_name,name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.%s",item_name,name);
hfri.hfinfo.type = FT_STRING;
hfri.hfinfo.display = BASE_NONE;
hfri.hfinfo.strings = NULL;
hfri.hfinfo.bitmask = 0;
- hfri.hfinfo.blurb = g_strdup_printf("%s attribute of %s",name,item_name);
+ hfri.hfinfo.blurb = ws_strdup_printf("%s attribute of %s",name,item_name);
*p_id = -1;
g_hash_table_insert(hfids,name,p_id);
@@ -271,16 +271,16 @@ static void analyze_pdu_config(mate_config* mc, mate_cfg_pdu* cfg) {
hfri.p_id = &(cfg->hfid);
hfri.hfinfo.name = g_strdup(cfg->name);
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s",cfg->name);
- hfri.hfinfo.blurb = g_strdup_printf("%s id",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s",cfg->name);
+ hfri.hfinfo.blurb = ws_strdup_printf("%s id",cfg->name);
hfri.hfinfo.type = FT_UINT32;
hfri.hfinfo.display = BASE_DEC;
g_array_append_val(mc->hfrs,hfri);
hfri.p_id = &(cfg->hfid_pdu_rel_time);
- hfri.hfinfo.name = g_strdup_printf("%s time",cfg->name);
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.RelativeTime",cfg->name);
+ hfri.hfinfo.name = ws_strdup_printf("%s time",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.RelativeTime",cfg->name);
hfri.hfinfo.type = FT_FLOAT;
hfri.hfinfo.display = BASE_NONE;
hfri.hfinfo.blurb = "Seconds passed since the start of capture";
@@ -288,8 +288,8 @@ static void analyze_pdu_config(mate_config* mc, mate_cfg_pdu* cfg) {
g_array_append_val(mc->hfrs,hfri);
hfri.p_id = &(cfg->hfid_pdu_time_in_gop);
- hfri.hfinfo.name = g_strdup_printf("%s time since beginning of Gop",cfg->name);
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.TimeInGop",cfg->name);
+ hfri.hfinfo.name = ws_strdup_printf("%s time since beginning of Gop",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.TimeInGop",cfg->name);
hfri.hfinfo.type = FT_FLOAT;
hfri.hfinfo.display = BASE_NONE;
hfri.hfinfo.blurb = "Seconds passed since the start of the GOP";
@@ -326,49 +326,49 @@ static void analyze_gop_config(gpointer k _U_, gpointer v, gpointer p) {
hfri.p_id = &(cfg->hfid);
hfri.hfinfo.name = g_strdup(cfg->name);
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s",cfg->name);
- hfri.hfinfo.blurb = g_strdup_printf("%s id",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s",cfg->name);
+ hfri.hfinfo.blurb = ws_strdup_printf("%s id",cfg->name);
hfri.hfinfo.type = FT_UINT32;
hfri.hfinfo.display = BASE_DEC;
g_array_append_val(mc->hfrs,hfri);
hfri.p_id = &(cfg->hfid_start_time);
- hfri.hfinfo.name = g_strdup_printf("%s start time",cfg->name);
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.StartTime",cfg->name);
+ hfri.hfinfo.name = ws_strdup_printf("%s start time",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.StartTime",cfg->name);
hfri.hfinfo.type = FT_FLOAT;
hfri.hfinfo.display = BASE_NONE;
- hfri.hfinfo.blurb = g_strdup_printf("Seconds passed since the beginning of capture to the start of this %s",cfg->name);
+ hfri.hfinfo.blurb = ws_strdup_printf("Seconds passed since the beginning of capture to the start of this %s",cfg->name);
g_array_append_val(mc->hfrs,hfri);
hfri.p_id = &(cfg->hfid_stop_time);
- hfri.hfinfo.name = g_strdup_printf("%s hold time",cfg->name);
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.Time",cfg->name);
- hfri.hfinfo.blurb = g_strdup_printf("Duration in seconds from start to stop of this %s",cfg->name);
+ hfri.hfinfo.name = ws_strdup_printf("%s hold time",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.Time",cfg->name);
+ hfri.hfinfo.blurb = ws_strdup_printf("Duration in seconds from start to stop of this %s",cfg->name);
g_array_append_val(mc->hfrs,hfri);
hfri.p_id = &(cfg->hfid_last_time);
- hfri.hfinfo.name = g_strdup_printf("%s duration",cfg->name);
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.Duration",cfg->name);
- hfri.hfinfo.blurb = g_strdup_printf("Time passed between the start of this %s and the last pdu assigned to it",cfg->name);
+ hfri.hfinfo.name = ws_strdup_printf("%s duration",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.Duration",cfg->name);
+ hfri.hfinfo.blurb = ws_strdup_printf("Time passed between the start of this %s and the last pdu assigned to it",cfg->name);
g_array_append_val(mc->hfrs,hfri);
hfri.p_id = &(cfg->hfid_gop_num_pdus);
- hfri.hfinfo.name = g_strdup_printf("%s number of PDUs",cfg->name);
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.NumOfPdus",cfg->name);
- hfri.hfinfo.blurb = g_strdup_printf("Number of PDUs assigned to this %s",cfg->name);
+ hfri.hfinfo.name = ws_strdup_printf("%s number of PDUs",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.NumOfPdus",cfg->name);
+ hfri.hfinfo.blurb = ws_strdup_printf("Number of PDUs assigned to this %s",cfg->name);
hfri.hfinfo.type = FT_UINT32;
hfri.hfinfo.display = BASE_DEC;
g_array_append_val(mc->hfrs,hfri);
hfri.p_id = &(cfg->hfid_gop_pdu);
- hfri.hfinfo.name = g_strdup_printf("A PDU of %s",cfg->name);
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.Pdu",cfg->name);
- hfri.hfinfo.blurb = g_strdup_printf("A PDU assigned to this %s",cfg->name);
+ hfri.hfinfo.name = ws_strdup_printf("A PDU of %s",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.Pdu",cfg->name);
+ hfri.hfinfo.blurb = ws_strdup_printf("A PDU assigned to this %s",cfg->name);
if (cfg->pdu_tree_mode == GOP_FRAME_TREE) {
hfri.hfinfo.type = FT_FRAMENUM;
@@ -445,8 +445,8 @@ static void analyze_gog_config(gpointer k _U_, gpointer v, gpointer p) {
/* create the hf array for this gog */
hfri.p_id = &(cfg->hfid);
hfri.hfinfo.name = g_strdup(cfg->name);
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s",cfg->name);
- hfri.hfinfo.blurb = g_strdup_printf("%s Id",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s",cfg->name);
+ hfri.hfinfo.blurb = ws_strdup_printf("%s Id",cfg->name);
hfri.hfinfo.type = FT_UINT32;
hfri.hfinfo.display = BASE_DEC;
@@ -454,16 +454,16 @@ static void analyze_gog_config(gpointer k _U_, gpointer v, gpointer p) {
hfri.p_id = &(cfg->hfid_gog_num_of_gops);
hfri.hfinfo.name = "number of GOPs";
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.NumOfGops",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.NumOfGops",cfg->name);
hfri.hfinfo.type = FT_UINT32;
hfri.hfinfo.display = BASE_DEC;
- hfri.hfinfo.blurb = g_strdup_printf("Number of GOPs assigned to this %s",cfg->name);
+ hfri.hfinfo.blurb = ws_strdup_printf("Number of GOPs assigned to this %s",cfg->name);
g_array_append_val(mc->hfrs,hfri);
hfri.p_id = &(cfg->hfid_gog_gopstart);
hfri.hfinfo.name = "GopStart frame";
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.GopStart",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.GopStart",cfg->name);
hfri.hfinfo.type = FT_FRAMENUM;
hfri.hfinfo.display = BASE_NONE;
hfri.hfinfo.blurb = g_strdup("The start frame of a GOP");
@@ -472,7 +472,7 @@ static void analyze_gog_config(gpointer k _U_, gpointer v, gpointer p) {
hfri.p_id = &(cfg->hfid_gog_gopstop);
hfri.hfinfo.name = "GopStop frame";
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.GopStop",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.GopStop",cfg->name);
hfri.hfinfo.type = FT_FRAMENUM;
hfri.hfinfo.display = BASE_NONE;
hfri.hfinfo.blurb = g_strdup("The stop frame of a GOP");
@@ -480,27 +480,27 @@ static void analyze_gog_config(gpointer k _U_, gpointer v, gpointer p) {
g_array_append_val(mc->hfrs,hfri);
hfri.p_id = &(cfg->hfid_start_time);
- hfri.hfinfo.name = g_strdup_printf("%s start time",cfg->name);
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.StartTime",cfg->name);
+ hfri.hfinfo.name = ws_strdup_printf("%s start time",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.StartTime",cfg->name);
hfri.hfinfo.type = FT_FLOAT;
- hfri.hfinfo.blurb = g_strdup_printf("Seconds passed since the beginning of capture to the start of this %s",cfg->name);
+ hfri.hfinfo.blurb = ws_strdup_printf("Seconds passed since the beginning of capture to the start of this %s",cfg->name);
g_array_append_val(mc->hfrs,hfri);
hfri.p_id = &(cfg->hfid_last_time);
- hfri.hfinfo.name = g_strdup_printf("%s duration",cfg->name);
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.Duration",cfg->name);
- hfri.hfinfo.blurb = g_strdup_printf("Time passed between the start of this %s and the last pdu assigned to it",cfg->name);
+ hfri.hfinfo.name = ws_strdup_printf("%s duration",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.Duration",cfg->name);
+ hfri.hfinfo.blurb = ws_strdup_printf("Time passed between the start of this %s and the last pdu assigned to it",cfg->name);
g_array_append_val(mc->hfrs,hfri);
/* this might become mate.gogname.gopname */
hfri.p_id = &(cfg->hfid_gog_gop);
hfri.hfinfo.name = "a GOP";
- hfri.hfinfo.abbrev = g_strdup_printf("mate.%s.Gop",cfg->name);
+ hfri.hfinfo.abbrev = ws_strdup_printf("mate.%s.Gop",cfg->name);
hfri.hfinfo.type = FT_STRING;
hfri.hfinfo.display = BASE_NONE;
- hfri.hfinfo.blurb = g_strdup_printf("a GOPs assigned to this %s",cfg->name);
+ hfri.hfinfo.blurb = ws_strdup_printf("a GOPs assigned to this %s",cfg->name);
g_array_append_val(mc->hfrs,hfri);
@@ -586,7 +586,7 @@ extern mate_config* mate_make_config(const gchar* filename, int mate_hfid) {
mc->dbg_facility = NULL;
- mc->mate_lib_path = g_strdup_printf("%s%c%s%c",get_datafile_dir(),DIR_SEP,DEFAULT_MATE_LIB_PATH,DIR_SEP);
+ mc->mate_lib_path = ws_strdup_printf("%s%c%s%c",get_datafile_dir(),DIR_SEP,DEFAULT_MATE_LIB_PATH,DIR_SEP);
mc->pducfgs = g_hash_table_new(g_str_hash,g_str_equal);
mc->gopcfgs = g_hash_table_new(g_str_hash,g_str_equal);
diff --git a/plugins/epan/mate/mate_util.c b/plugins/epan/mate/mate_util.c
index 30a4f098b4..063a7294b7 100644
--- a/plugins/epan/mate/mate_util.c
+++ b/plugins/epan/mate/mate_util.c
@@ -1435,13 +1435,13 @@ static LoAL* load_loal_error(FILE* fp, LoAL* loal, AVPL* curr, int linenum, cons
gchar* err;
va_start( list, fmt );
- desc = g_strdup_vprintf(fmt, list);
+ desc = ws_strdup_vprintf(fmt, list);
va_end( list );
if (loal) {
- err = g_strdup_printf("Error Loading LoAL from file: in %s at line: %i, %s",loal->name,linenum,desc);
+ err = ws_strdup_printf("Error Loading LoAL from file: in %s at line: %i, %s",loal->name,linenum,desc);
} else {
- err = g_strdup_printf("Error Loading LoAL at line: %i, %s",linenum,desc);
+ err = ws_strdup_printf("Error Loading LoAL at line: %i, %s",linenum,desc);
}
ret = new_loal(err);
diff --git a/plugins/epan/mate/mate_util.h b/plugins/epan/mate/mate_util.h
index a233f5fc34..0764ea5ec2 100644
--- a/plugins/epan/mate/mate_util.h
+++ b/plugins/epan/mate/mate_util.h
@@ -150,7 +150,7 @@ extern void delete_avp(AVP* avp);
* avp methods
*/
/* returns a newly allocated string containing a representation of the avp */
-#define avp_to_str(avp) (g_strdup_printf("%s%c%s",avp->n,avp->o,avp->v))
+#define avp_to_str(avp) (ws_strdup_printf("%s%c%s",avp->n,avp->o,avp->v))
/* returns the src avp if the src avp matches(*) the op avp or NULL if it doesn't */
extern AVP* match_avp(AVP* src, AVP* op);
diff --git a/plugins/epan/pluginifdemo/pluginifdemo.c b/plugins/epan/pluginifdemo/pluginifdemo.c
index 5cbe4ad4fc..e6c42b474d 100644
--- a/plugins/epan/pluginifdemo/pluginifdemo.c
+++ b/plugins/epan/pluginifdemo/pluginifdemo.c
@@ -105,31 +105,31 @@ void toolbar_cb(gpointer toolbar_item, gpointer item_data, gpointer user_data _U
pluginifdemo_toolbar_log("Button pressed at toolbar");
guint32 fnum = GPOINTER_TO_UINT(plugin_if_get_frame_data(get_frame_data_cb, NULL));
if (fnum) {
- message = g_strdup_printf("Current frame is: %u", fnum);
+ message = ws_strdup_printf("Current frame is: %u", fnum);
pluginifdemo_toolbar_log(message);
}
const gchar* fnm = (const gchar*)plugin_if_get_capture_file(get_capture_file_cb, NULL);
if (fnm) {
- message = g_strdup_printf("Capture file name is: %s", fnm);
+ message = ws_strdup_printf("Capture file name is: %s", fnm);
pluginifdemo_toolbar_log(message);
}
}
else if ( entry->item_type == EXT_TOOLBAR_BOOLEAN )
{
gboolean data = *((gboolean *)item_data);
- message = g_strdup_printf( "Checkbox selected value: %d", (int) (data) );
+ message = ws_strdup_printf( "Checkbox selected value: %d", (int) (data) );
pluginifdemo_toolbar_log(message);
}
else if ( entry->item_type == EXT_TOOLBAR_STRING )
{
gchar * data = (gchar *)item_data;
- message = g_strdup_printf( "String entered in toolbar: %s", data );
+ message = ws_strdup_printf( "String entered in toolbar: %s", data );
pluginifdemo_toolbar_log(message);
}
else if ( entry->item_type == EXT_TOOLBAR_SELECTOR )
{
ext_toolbar_value_t * data = (ext_toolbar_value_t *)item_data;
- message = g_strdup_printf( "Value from toolbar: %s", data->value );
+ message = ws_strdup_printf( "Value from toolbar: %s", data->value );
pluginifdemo_toolbar_log(message);
}
diff --git a/plugins/epan/profinet/packet-dcerpc-pn-io.c b/plugins/epan/profinet/packet-dcerpc-pn-io.c
index a378a2c0a4..cf154059a6 100644
--- a/plugins/epan/profinet/packet-dcerpc-pn-io.c
+++ b/plugins/epan/profinet/packet-dcerpc-pn-io.c
@@ -11889,7 +11889,7 @@ pn_io_ar_conv_filter(packet_info *pinfo)
set_address(&controllermac_addr, AT_ETHER, 6, ar->controllermac);
set_address(&devicemac_addr, AT_ETHER, 6, ar->devicemac);
- buf = g_strdup_printf(
+ buf = ws_strdup_printf(
"pn_io.ar_uuid == %s || " /* ARUUID */
"(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s) || " /* Alarm CR (contr -> dev) */
"(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s)", /* Alarm CR (dev -> contr) */
@@ -11919,7 +11919,7 @@ pn_io_ar_conv_data_filter(packet_info *pinfo)
guid_str = guid_to_str(pinfo->pool, (const e_guid_t*) &ar->aruuid);
if (ar->arType == 0x0010) /* IOCARSingle using RT_CLASS_3 */
{
- buf = g_strdup_printf(
+ buf = ws_strdup_printf(
"pn_io.ar_uuid == %s || " /* ARUUID */
"(pn_rt.frame_id == 0x%x) || (pn_rt.frame_id == 0x%x) || "
"(pn_io.alarm_src_endpoint == 0x%x && eth.src == %s) || " /* Alarm CR (contr -> dev) */
@@ -11931,7 +11931,7 @@ pn_io_ar_conv_data_filter(packet_info *pinfo)
}
else
{
- buf = g_strdup_printf(
+ buf = ws_strdup_printf(
"pn_io.ar_uuid == %s || " /* ARUUID */
"(pn_rt.frame_id == 0x%x && eth.src == %s && eth.dst == %s) || " /* Input CR && dev MAC -> contr MAC */
"(pn_rt.frame_id == 0x%x && eth.src == %s && eth.dst == %s) || " /* Output CR && contr MAC -> dev MAC */
diff --git a/plugins/epan/profinet/packet-dcom-cba-acco.c b/plugins/epan/profinet/packet-dcom-cba-acco.c
index 9026023d62..825284cbca 100644
--- a/plugins/epan/profinet/packet-dcom-cba-acco.c
+++ b/plugins/epan/profinet/packet-dcom-cba-acco.c
@@ -345,25 +345,25 @@ cba_build_filter(packet_info *pinfo)
/* IPv4 */
switch(GPOINTER_TO_UINT(profinet_type)) {
case 1:
- return g_strdup_printf("(ip.src eq %s and ip.dst eq %s and cba.acco.dcom == 1) || (ip.src eq %s and ip.dst eq %s and cba.acco.dcom == 0)",
+ return ws_strdup_printf("(ip.src eq %s and ip.dst eq %s and cba.acco.dcom == 1) || (ip.src eq %s and ip.dst eq %s and cba.acco.dcom == 0)",
address_to_str(pinfo->pool, &pinfo->net_dst),
address_to_str(pinfo->pool, &pinfo->net_src),
address_to_str(pinfo->pool, &pinfo->net_src),
address_to_str(pinfo->pool, &pinfo->net_dst));
case 2:
- return g_strdup_printf("(ip.src eq %s and ip.dst eq %s and cba.acco.dcom == 1) || (ip.src eq %s and ip.dst eq %s and cba.acco.dcom == 0)",
+ return ws_strdup_printf("(ip.src eq %s and ip.dst eq %s and cba.acco.dcom == 1) || (ip.src eq %s and ip.dst eq %s and cba.acco.dcom == 0)",
address_to_str(pinfo->pool, &pinfo->net_src),
address_to_str(pinfo->pool, &pinfo->net_dst),
address_to_str(pinfo->pool, &pinfo->net_dst),
address_to_str(pinfo->pool, &pinfo->net_src));
case 3:
- return g_strdup_printf("(ip.src eq %s and ip.dst eq %s and cba.acco.srt == 1) || (ip.src eq %s and ip.dst eq %s and cba.acco.srt == 0)",
+ return ws_strdup_printf("(ip.src eq %s and ip.dst eq %s and cba.acco.srt == 1) || (ip.src eq %s and ip.dst eq %s and cba.acco.srt == 0)",
address_to_str(pinfo->pool, &pinfo->net_dst),
address_to_str(pinfo->pool, &pinfo->net_src),
address_to_str(pinfo->pool, &pinfo->net_src),
address_to_str(pinfo->pool, &pinfo->net_dst));
case 4:
- return g_strdup_printf("(ip.src eq %s and ip.dst eq %s and cba.acco.srt == 1) || (ip.src eq %s and ip.dst eq %s and cba.acco.srt == 0)",
+ return ws_strdup_printf("(ip.src eq %s and ip.dst eq %s and cba.acco.srt == 1) || (ip.src eq %s and ip.dst eq %s and cba.acco.srt == 0)",
address_to_str(pinfo->pool, &pinfo->net_src),
address_to_str(pinfo->pool, &pinfo->net_dst),
address_to_str(pinfo->pool, &pinfo->net_dst),
diff --git a/plugins/epan/stats_tree/pinfo_stats_tree.c b/plugins/epan/stats_tree/pinfo_stats_tree.c
index ce715c887b..0bc231ea99 100644
--- a/plugins/epan/stats_tree/pinfo_stats_tree.c
+++ b/plugins/epan/stats_tree/pinfo_stats_tree.c
@@ -255,7 +255,7 @@ static void plen_stats_tree_init(stats_tree *st) {
for (i = 0; i < num_plen_uat - 1; i++) {
str_range_array[i] = range_convert_range(NULL, uat_plen_records[i].packet_range);
}
- str_range_array[num_plen_uat - 1] = g_strdup_printf("%u and greater",
+ str_range_array[num_plen_uat - 1] = ws_strdup_printf("%u and greater",
uat_plen_records[num_plen_uat - 1].packet_range->ranges[0].low);
st_node_plen = stats_tree_create_range_node_string(st, st_str_plen, 0, num_plen_uat, str_range_array);
diff --git a/plugins/epan/wimaxasncp/packet-wimaxasncp.c b/plugins/epan/wimaxasncp/packet-wimaxasncp.c
index e0e1bfc282..ae89c8fdc4 100644
--- a/plugins/epan/wimaxasncp/packet-wimaxasncp.c
+++ b/plugins/epan/wimaxasncp/packet-wimaxasncp.c
@@ -3231,7 +3231,7 @@ register_wimaxasncp_fields(const char* unused _U_)
debug_parser = getenv("WIRESHARK_DEBUG_WIMAXASNCP_DICT_PARSER") != NULL;
dump_dict = getenv("WIRESHARK_DUMP_WIMAXASNCP_DICT") != NULL;
- dir = g_strdup_printf(
+ dir = ws_strdup_printf(
"%s" G_DIR_SEPARATOR_S "wimaxasncp",
get_datafile_dir());
diff --git a/plugins/epan/wimaxasncp/wimaxasncp_dict.l b/plugins/epan/wimaxasncp/wimaxasncp_dict.l
index 883afbc020..3b42207e5e 100644
--- a/plugins/epan/wimaxasncp/wimaxasncp_dict.l
+++ b/plugins/epan/wimaxasncp/wimaxasncp_dict.l
@@ -346,7 +346,7 @@ since_attr since=\042
}
if (!e) {
- temp_str = g_strdup_printf(
+ temp_str = ws_strdup_printf(
"cannot find entity: '%s'\n", yytext);
yyextra->dict_error = g_string_append(yyextra->dict_error, temp_str);
g_free(temp_str);
@@ -642,7 +642,7 @@ static FILE *wimaxasncp_dict_open(
gchar *fname;
if (system_directory)
{
- fname = g_strdup_printf("%s%s%s",
+ fname = ws_strdup_printf("%s%s%s",
system_directory, G_DIR_SEPARATOR_S,filename);
}
else
diff --git a/plugins/wiretap/usbdump/usbdump.c b/plugins/wiretap/usbdump/usbdump.c
index dfcdf5252a..5cc01ec1f6 100644
--- a/plugins/wiretap/usbdump/usbdump.c
+++ b/plugins/wiretap/usbdump/usbdump.c
@@ -113,7 +113,7 @@ usbdump_open(wtap *wth, int *err, char **err_info)
if (GUINT16_FROM_BE(version) != 3) {
/* We only support version 0.3 */
*err = WTAP_ERR_UNSUPPORTED;
- *err_info = g_strdup_printf("usbdump: version %u.%u unsupported",
+ *err_info = ws_strdup_printf("usbdump: version %u.%u unsupported",
version >> 8, version & 0xff);
return WTAP_OPEN_NOT_MINE;
}
@@ -176,7 +176,7 @@ usbdump_read(wtap *wth, wtap_rec *rec, Buffer *buf, int *err, gchar **err_info,
if (usbdump_info->multiframe_overrun)
{
*err = WTAP_ERR_BAD_FILE;
- *err_info = g_strdup_printf("Multiframe overrun");
+ *err_info = ws_strdup_printf("Multiframe overrun");
return FALSE;
}