Done for performance improvements.
This could probably be done in checkAPIs.pl, but this was just
a quick manual check with grepping.
Change-Id: I91ff102cb528bb00fa2f65489de53890e7e46f2d
Reviewed-on: https://code.wireshark.org/review/15751
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
if (type)
opt = g_strdup_printf("%s,%s,%s,%s", freq, type, center_freq1, center_freq2);
else
- opt = g_strdup_printf("%s", freq);
+ opt = g_strdup(freq);
if (!opt) {
*primary_msg = g_strdup("Out of mem.");
if (a == 0)
{
if (g_ascii_strcasecmp(if_info->name,AIRPCAP_DEVICE_ANY_EXTRACT_STRING)!=0)
- number = g_strdup_printf("??");
+ number = g_strdup("??");
else
- number = g_strdup_printf(AIRPCAP_CHANNEL_ANY_NAME);
+ number = g_strdup(AIRPCAP_CHANNEL_ANY_NAME);
}
else
{
static echld_bool_t param_set_ ## Name (char* val , char** err _U_) { char* p; int temp = (int)strtol(val, &p, 10); if (p<=val) { *err = g_strdup("not an integer"); return FALSE; } else { param_ ## Name = temp; return TRUE; } }
#define PARAM_BOOL(Name, Default) static gboolean param_ ## Name = Default; \
- static char* param_get_ ## Name (char** err _U_ ) { return g_strdup_printf("%s",param_ ## Name ? "TRUE" : "FALSE"); } \
+ static char* param_get_ ## Name (char** err _U_ ) { return g_strdup(param_ ## Name ? "TRUE" : "FALSE"); } \
static echld_bool_t param_set_ ## Name (char* val , char** err _U_) { param_ ## Name = (*val == 'T' || *val == 't') ? TRUE : FALSE; return TRUE;}
#define PARAM(Name,Desc) {#Name, param_get_ ## Name, param_set_ ## Name, Desc}
if(and_filter_string) {
proto_item_append_text(it, "%%s", and_filter_string);
- Filter_string=wmem_strdup_printf(wmem_packet_scope(), "%%s",and_filter_string);
+ Filter_string=wmem_strdup(wmem_packet_scope(), and_filter_string);
}
and_filter_string=old_and_filter_string;
%(DEFAULT_BODY)s
if(or_filter_string) {
proto_item_append_text(it, "%%s", or_filter_string);
- Filter_string=wmem_strdup_printf(wmem_packet_scope(), "%%s",or_filter_string);
+ Filter_string=wmem_strdup(wmem_packet_scope(), or_filter_string);
}
or_filter_string=old_or_filter_string;
else if (actx->rose_ctx->d.code == 1)
descr = wmem_strdup_printf(wmem_packet_scope(), "ERR: %s", actx->rose_ctx->d.code_global);
} else {
- descr = wmem_strdup_printf(wmem_packet_scope(), "ERR:");
+ descr = wmem_strdup(wmem_packet_scope(), "ERR:");
}
if (actx->rose_ctx->apdu_depth >= 0)
else if (actx->rose_ctx->d.code == 1)
descr = wmem_strdup_printf(wmem_packet_scope(), "INV: %s", actx->rose_ctx->d.code_global);
} else {
- descr = wmem_strdup_printf(wmem_packet_scope(), "INV:");
+ descr = wmem_strdup(wmem_packet_scope(), "INV:");
}
if (actx->rose_ctx->apdu_depth >= 0)
else if (actx->rose_ctx->d.code == 1)
descr = wmem_strdup_printf(wmem_packet_scope(), "RES: %s", actx->rose_ctx->d.code_global);
} else {
- descr = wmem_strdup_printf(wmem_packet_scope(), "RES:");
+ descr = wmem_strdup(wmem_packet_scope(), "RES:");
}
if (actx->rose_ctx->apdu_depth >= 0)
set_address_tvb(&addr, AT_IPv4, 4, tvb, offset);
offset += 4;
- str = wmem_strdup_printf(wmem_packet_scope(), "%s",
- address_to_display(wmem_packet_scope(), &addr));
+ str = address_to_display(wmem_packet_scope(), &addr);
break;
case 0x0004:
set_address_tvb(&addr, AT_IPv6, 16, tvb, offset);
offset += 16;
- str = wmem_strdup_printf(wmem_packet_scope(), "%s",
- address_to_display(wmem_packet_scope(), &addr));
+ str = address_to_display(wmem_packet_scope(), &addr);
break;
default:
}
}
- str = wmem_strdup_printf(wmem_packet_scope(), "%s",
- address_to_display(wmem_packet_scope(), &addr));
+ str = address_to_display(wmem_packet_scope(), &addr);
break;
case 0x0002: /* IPv6 Record */
if (record_length < 17) {
}
}
- str = wmem_strdup_printf(wmem_packet_scope(), "%s",
- address_to_display(wmem_packet_scope(), &addr));
+ str = address_to_display(wmem_packet_scope(), &addr);
break;
default:
/* GetPrinterDataEx() stores the key/value in se_data */
if(!pinfo->fd->flags.visited){
if(!dcv->se_data){
- dcv->se_data = wmem_strdup_printf(wmem_file_scope(),
- "%s", value_name?value_name:"");
+ dcv->se_data = wmem_strdup(wmem_file_scope(),
+ value_name?value_name:"");
}
}
/* OpenPrinterEx() stores the key/value in se_data */
if(!pinfo->fd->flags.visited){
if(!dcv->se_data){
- dcv->se_data = wmem_strdup_printf(wmem_file_scope(),
- "%s", name?name:"");
+ dcv->se_data = wmem_strdup(wmem_file_scope(),
+ name?name:"");
}
}
uat_devicenet_record_t* rec = (uat_devicenet_record_t *)r;
if (rec->mac_id > 63) {
- *err = g_strdup_printf("MAC ID must be between 0-63");
+ *err = g_strdup("MAC ID must be between 0-63");
return FALSE;
}
return TRUE;
item = proto_tree_add_item(tree, hf_diameter_3gpp_imeisv, tvb, offset, length, ENC_UTF_8 | ENC_NA);
PROTO_ITEM_SET_GENERATED(item);
- diam_sub_dis->avp_str = wmem_strdup_printf(wmem_packet_scope(), "%s",
- tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_UTF_8 | ENC_NA));
+ diam_sub_dis->avp_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_UTF_8 | ENC_NA);
}
return length;
item = proto_tree_add_item(tree, hf_diameter_3gpp_af_application_identifier, tvb, offset, length, ENC_UTF_8 | ENC_NA);
PROTO_ITEM_SET_GENERATED(item);
- diam_sub_dis->avp_str = wmem_strdup_printf(wmem_packet_scope(), "%s",
- tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_UTF_8 | ENC_NA));
+ diam_sub_dis->avp_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_UTF_8 | ENC_NA);
}
return length;
item = proto_tree_add_item(tree, hf_diameter_3gpp_af_charging_identifier, tvb, offset, length, ENC_UTF_8 | ENC_NA);
PROTO_ITEM_SET_GENERATED(item);
- diam_sub_dis->avp_str = wmem_strdup_printf(wmem_packet_scope(), "%s",
- tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_UTF_8 | ENC_NA));
+ diam_sub_dis->avp_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_UTF_8 | ENC_NA);
}
return length;
item = proto_tree_add_item(tree, hf_diameter_3gpp_charging_rule_name, tvb, offset, length, ENC_UTF_8 | ENC_NA);
PROTO_ITEM_SET_GENERATED(item);
- diam_sub_dis->avp_str = wmem_strdup_printf(wmem_packet_scope(), "%s",
- tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_UTF_8 | ENC_NA));
+ diam_sub_dis->avp_str = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, length, ENC_UTF_8 | ENC_NA);
}
return length;
size = (guint32)strlen(rec->domain);
if (!VALIDHEX(rec->domain[0]) && !dof_oid_create_internal(rec->domain, &size, NULL))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid domain [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid domain [must be valid OID].");
return;
}
else if (!count_hex_bytes(rec->domain))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid domain [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid domain [must be valid OID].");
return;
}
size = (guint32)strlen(rec->identity);
if (!VALIDHEX(rec->identity[0]) && !dof_oid_create_internal(rec->identity, &size, NULL))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid identity [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid identity [must be valid OID].");
return;
}
else if (!count_hex_bytes(rec->identity))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid identity [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid identity [must be valid OID].");
return;
}
if (count_hex_bytes(rec->kek) != 32)
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid KEK [must be 32 byte key].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid KEK [must be 32 byte key].");
return;
}
}
*err = NULL;
if (count_hex_bytes(rec->key) != 32)
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid secret [must be 32 bytes].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid secret [must be 32 bytes].");
return;
}
}
{
if (dof_oid_create_internal(rec->domain, &size, NULL))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid domain [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid domain [must be valid OID].");
return;
}
}
else if (!count_hex_bytes(rec->domain))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid domain [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid domain [must be valid OID].");
return;
}
{
if (dof_oid_create_internal(rec->identity, &size, NULL))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid identity [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid identity [must be valid OID].");
return;
}
}
else if (!count_hex_bytes(rec->identity))
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid identity [must be valid OID].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid identity [must be valid OID].");
return;
}
if (count_hex_bytes(rec->secret) != 32)
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "Invalid secret [must be 32 byte key].");
+ *err = wmem_strdup(wmem_packet_scope(), "Invalid secret [must be 32 byte key].");
return;
}
}
if (!num_protos)
{
- *err = wmem_strdup_printf(wmem_packet_scope(), "No protocols given");
+ *err = wmem_strdup(wmem_packet_scope(), "No protocols given");
return FALSE;
}
dtlsdecrypt_uat_fld_protocol_chk_cb(void* r _U_, const char* p, guint len _U_, const void* u1 _U_, const void* u2 _U_, char** err)
{
if (!p || strlen(p) == 0u) {
- *err = g_strdup_printf("No protocol given.");
+ *err = g_strdup("No protocol given.");
return FALSE;
}
else if (actx->rose_ctx->d.code == 1)
descr = wmem_strdup_printf(wmem_packet_scope(), "INV: %s", actx->rose_ctx->d.code_global);
} else {
- descr = wmem_strdup_printf(wmem_packet_scope(), "INV:");
+ descr = wmem_strdup(wmem_packet_scope(), "INV:");
}
if (actx->rose_ctx->apdu_depth >= 0)
else if (actx->rose_ctx->d.code == 1)
descr = wmem_strdup_printf(wmem_packet_scope(), "RES: %s", actx->rose_ctx->d.code_global);
} else {
- descr = wmem_strdup_printf(wmem_packet_scope(), "RES:");
+ descr = wmem_strdup(wmem_packet_scope(), "RES:");
}
if (actx->rose_ctx->apdu_depth >= 0)
else if (actx->rose_ctx->d.code == 1)
descr = wmem_strdup_printf(wmem_packet_scope(), "ERR: %s", actx->rose_ctx->d.code_global);
} else {
- descr = wmem_strdup_printf(wmem_packet_scope(), "ERR:");
+ descr = wmem_strdup(wmem_packet_scope(), "ERR:");
}
if (actx->rose_ctx->apdu_depth >= 0)
}
if (ud->key_len == 0) {
- *err = g_strdup_printf("Must have Encryption key.");
+ *err = g_strdup("Must have Encryption key.");
return FALSE;
}
g_strstrip(protos[num_protos]);
if (!num_protos) {
- *err = g_strdup_printf("No protocols given");
+ *err = g_strdup("No protocols given");
wmem_free(NULL, line);
wmem_free(NULL, protos);
return FALSE;
if (tag->name == NULL)
{
- *error_string = g_strdup_printf("Tag name can't be empty");
+ *error_string = g_strdup("Tag name can't be empty");
return FALSE;
}
else
g_strstrip(tag->name);
if (tag->name[0] == 0)
{
- *error_string = g_strdup_printf("Tag name can't be empty");
+ *error_string = g_strdup("Tag name can't be empty");
return FALSE;
}
}
if (tag->name == NULL)
{
- *error_string = g_strdup_printf("Tag name can't be empty");
+ *error_string = g_strdup("Tag name can't be empty");
return FALSE;
}
else
g_strstrip(tag->name);
if (tag->name[0] == 0)
{
- *error_string = g_strdup_printf("Tag name can't be empty");
+ *error_string = g_strdup("Tag name can't be empty");
return FALSE;
}
}
if (tag->name == NULL)
{
- *error_string = g_strdup_printf("Tag name can't be empty");
+ *error_string = g_strdup("Tag name can't be empty");
return FALSE;
}
else
g_strstrip(tag->name);
if (tag->name[0] == 0)
{
- *error_string = g_strdup_printf("Tag name can't be empty");
+ *error_string = g_strdup("Tag name can't be empty");
return FALSE;
}
}
if (tag->name == NULL)
{
- *error_string = g_strdup_printf("Tag name can't be empty");
+ *error_string = g_strdup("Tag name can't be empty");
return FALSE;
}
else
g_strstrip(tag->name);
if (tag->name[0] == 0)
{
- *error_string = g_strdup_printf("Tag name can't be empty");
+ *error_string = g_strdup("Tag name can't be empty");
return FALSE;
}
}
if (tag->name == NULL)
{
- *error_string = g_strdup_printf("Tag name can't be empty");
+ *error_string = g_strdup("Tag name can't be empty");
return FALSE;
}
else
g_strstrip(tag->name);
if (tag->name[0] == 0)
{
- *error_string = g_strdup_printf("Tag name can't be empty");
+ *error_string = g_strdup("Tag name can't be empty");
return FALSE;
}
}
if(and_filter_string) {
proto_item_append_text(it, "%s", and_filter_string);
- Filter_string=wmem_strdup_printf(wmem_packet_scope(), "%s",and_filter_string);
+ Filter_string=wmem_strdup(wmem_packet_scope(), and_filter_string);
}
and_filter_string=old_and_filter_string;
if(or_filter_string) {
proto_item_append_text(it, "%s", or_filter_string);
- Filter_string=wmem_strdup_printf(wmem_packet_scope(), "%s",or_filter_string);
+ Filter_string=wmem_strdup(wmem_packet_scope(), or_filter_string);
}
or_filter_string=old_or_filter_string;
else if (actx->rose_ctx->d.code == 1)
descr = wmem_strdup_printf(wmem_packet_scope(), "INV: %s", actx->rose_ctx->d.code_global);
} else {
- descr = wmem_strdup_printf(wmem_packet_scope(), "INV:");
+ descr = wmem_strdup(wmem_packet_scope(), "INV:");
}
if (actx->rose_ctx->apdu_depth >= 0)
else if (actx->rose_ctx->d.code == 1)
descr = wmem_strdup_printf(wmem_packet_scope(), "RES: %s", actx->rose_ctx->d.code_global);
} else {
- descr = wmem_strdup_printf(wmem_packet_scope(), "RES:");
+ descr = wmem_strdup(wmem_packet_scope(), "RES:");
}
if (actx->rose_ctx->apdu_depth >= 0)
else if (actx->rose_ctx->d.code == 1)
descr = wmem_strdup_printf(wmem_packet_scope(), "ERR: %s", actx->rose_ctx->d.code_global);
} else {
- descr = wmem_strdup_printf(wmem_packet_scope(), "ERR:");
+ descr = wmem_strdup(wmem_packet_scope(), "ERR:");
}
if (actx->rose_ctx->apdu_depth >= 0)
}
else
{
- *err = g_strdup_printf("<program>,<version>[,<filter>]");
+ *err = g_strdup("<program>,<version>[,<filter>]");
}
return pos;
}
else
{
- *err = g_strdup_printf("<cmdset>[,<filter>]");
+ *err = g_strdup("<cmdset>[,<filter>]");
}
return pos;
ssldecrypt_uat_fld_ip_chk_cb(void* r _U_, const char* p, guint len _U_, const void* u1 _U_, const void* u2 _U_, char** err)
{
if (!p || strlen(p) == 0u) {
- *err = g_strdup_printf("No IP address given.");
+ *err = g_strdup("No IP address given.");
return FALSE;
}
ssldecrypt_uat_fld_port_chk_cb(void* r _U_, const char* p, guint len _U_, const void* u1 _U_, const void* u2 _U_, char** err)
{
if (!p || strlen(p) == 0u) {
- *err = g_strdup_printf("No Port given.");
+ *err = g_strdup("No Port given.");
return FALSE;
}
if (strcmp(p, "start_tls") != 0){
const gint i = atoi(p);
if (i < 0 || i > 65535) {
- *err = g_strdup_printf("Invalid port given.");
+ *err = g_strdup("Invalid port given.");
return FALSE;
}
}
ws_statb64 st;
if (!p || strlen(p) == 0u) {
- *err = g_strdup_printf("No filename given.");
+ *err = g_strdup("No filename given.");
return FALSE;
} else {
if (ws_stat64(p, &st) != 0) {
ssldecrypt_uat_fld_protocol_chk_cb(void* r _U_, const char* p, guint len _U_, const void* u1 _U_, const void* u2 _U_, char** err)
{
if (!p || strlen(p) == 0u) {
- *err = g_strdup_printf("No protocol given.");
+ *err = g_strdup("No protocol given.");
return FALSE;
}
uat_key_record_t *rec = (uat_key_record_t *)r;
if (rec->string == NULL) {
- *err = g_strdup_printf("Key can't be blank.");
+ *err = g_strdup("Key can't be blank.");
return FALSE;
} else {
g_strstrip(rec->string);
return FALSE;
}
} else {
- *err = g_strdup_printf("Key can't be blank.");
+ *err = g_strdup("Key can't be blank.");
return FALSE;
}
}
if ( (packet.dst == ZBEE_BCAST_ALL)
|| (packet.dst == ZBEE_BCAST_ACTIVE)
|| (packet.dst == ZBEE_BCAST_ROUTERS)){
- dst_addr = wmem_strdup_printf(pinfo->pool, "Broadcast");
+ dst_addr = wmem_strdup(pinfo->pool, "Broadcast");
}
else {
dst_addr = wmem_strdup_printf(pinfo->pool, "0x%04x", packet.dst);
|| (packet.src == ZBEE_BCAST_ACTIVE)
|| (packet.src == ZBEE_BCAST_ROUTERS)){
/* Source Broadcast doesn't make much sense. */
- src_addr = wmem_strdup_printf(pinfo->pool, "Unexpected Source Broadcast");
+ src_addr = wmem_strdup(pinfo->pool, "Unexpected Source Broadcast");
unicast_src = FALSE;
}
else {
}
case PREF_BOOL:
- return g_strdup_printf("%s", (*(gboolean *) valp) ? "TRUE" : "FALSE");
+ return g_strdup((*(gboolean *) valp) ? "TRUE" : "FALSE");
case PREF_ENUM:
{
/* Open session and set options */
sshs = ssh_new();
if (sshs == NULL) {
- *err_info = g_strdup_printf("Can't create ssh session");
+ *err_info = g_strdup("Can't create ssh session");
return NULL;
}
if (!hostname) {
- *err_info = g_strdup_printf("Hostname needed");
+ *err_info = g_strdup("Hostname needed");
goto failure;
}
* used.
*/
if (data_link_info->description != NULL) {
- str = g_strdup_printf("%s", data_link_info->description);
+ str = g_strdup(data_link_info->description);
linkr->dlt = data_link_info->dlt;
} else {
str = g_strdup_printf("%s (not supported)", data_link_info->name);
g_free(device.name);
g_free(device.display_name);
device.name = g_strdup((gchar *)data);
- device.display_name = g_strdup_printf("%s", device.name);
+ device.display_name = g_strdup(device.name);
g_array_remove_index(global_capture_opts.all_ifaces, i);
g_array_insert_val(global_capture_opts.all_ifaces, i, device);
temp = g_strdup_printf("<b>%s</b>", device.display_name);
pipe_name = g_strdup(g_save_file);
memset(&device, 0, sizeof(device));
device.name = g_strdup(g_save_file);
- device.display_name = g_strdup_printf("%s", device.name);
+ device.display_name = g_strdup(device.name);
device.hidden = FALSE;
device.selected = TRUE;
device.type = IF_PIPE;
switch(type){
case ACTYPE_SELECTED:
- str = g_strdup_printf("%s", filter);
+ str = g_strdup(filter);
break;
case ACTYPE_NOT_SELECTED:
str = g_strdup_printf("!(%s)", filter);
break;
case ACTYPE_AND_SELECTED:
if ((!current_filter) || (0 == strlen(current_filter)))
- str = g_strdup_printf("%s", filter);
+ str = g_strdup(filter);
else
str = g_strdup_printf("(%s) && (%s)", current_filter, filter);
break;
case ACTYPE_OR_SELECTED:
if ((!current_filter) || (0 == strlen(current_filter)))
- str = g_strdup_printf("%s", filter);
+ str = g_strdup(filter);
else
str = g_strdup_printf("(%s) || (%s)", current_filter, filter);
break;
/* First check selected column */
if (is_address_column (column)) {
- addr_list = g_list_append (addr_list, g_strdup_printf("%s", cfile.cinfo.col_expr.col_expr_val[column]));
+ addr_list = g_list_append (addr_list, g_strdup(cfile.cinfo.col_expr.col_expr_val[column]));
}
for (col = 0; col < cfile.cinfo.num_cols; col++) {
/* Then check all columns except the selected */
if ((col != column) && (is_address_column (col))) {
- addr_list = g_list_append (addr_list, g_strdup_printf("%s", cfile.cinfo.col_expr.col_expr_val[col]));
+ addr_list = g_list_append (addr_list, g_strdup(cfile.cinfo.col_expr.col_expr_val[col]));
}
}
cfmt->custom_fields = NULL;
cfmt->custom_occurrence = 0;
}
- fmt = g_strdup_printf("%s", col_format_desc(cfmt->fmt));
+ fmt = g_strdup(col_format_desc(cfmt->fmt));
}
gtk_list_store_insert_with_values(store, &iter, G_MAXINT,
VISIBLE_COLUMN, cfmt->visible,
/* Changing from custom to non-custom */
gtk_editable_delete_text(GTK_EDITABLE(field_te), 0, -1);
gtk_editable_delete_text(GTK_EDITABLE(occurrence_te), 0, -1);
- fmt = g_strdup_printf("%s", col_format_desc(cur_cb_fmt));
+ fmt = g_strdup(col_format_desc(cur_cb_fmt));
gtk_widget_set_sensitive(field_lb, FALSE);
gtk_widget_set_sensitive(field_te, FALSE);
gtk_widget_set_sensitive(occurrence_lb, FALSE);
} else {
/* Changing from non-custom to non-custom */
- fmt = g_strdup_printf("%s", col_format_desc(cur_cb_fmt));
+ fmt = g_strdup(col_format_desc(cur_cb_fmt));
}
g_signal_handler_unblock(occurrence_te, column_occurrence_changed_handler_id);
g_signal_handler_unblock(field_te, column_field_changed_handler_id);
gtk_tree_model_get (model, &iter, FILTER_NAME, &filter, -1);
if (filter && strlen(filter) > 0) {
- str = g_strdup_printf("%s", filter);
+ str = g_strdup(filter);
} else {
simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Could not acquire information to build a filter!\nTry expanding or choosing another item.");
return;
while (gtk_tree_path_up(path) && gtk_tree_path_get_depth(path) > 0)
{
- strtmp = g_strdup_printf("%s", str);
+ strtmp = g_strdup(str);
g_free(str);
gtk_tree_model_get_iter(model, &iter, path);
dstlist = g_list_next(dstlist);
wmem_free(NULL, addr_str);
}
- str = g_strdup_printf(")))");
+ str = g_strdup(")))");
g_string_append(gstring, str);
filter_string = g_string_free(gstring, FALSE);
}
wmem_free(NULL, addr_str);
dstlist = g_list_next(dstlist);
}
- str = g_strdup_printf(")))");
+ str = g_strdup(")))");
g_string_append(gstring, str);
filter_string = g_string_free(gstring,FALSE);
}
title=g_strdup_printf("%s with filter: %s",st->display_name,st->filter);
} else {
st->filter=NULL;
- title=g_strdup_printf("%s", st->display_name);
+ title=g_strdup(st->display_name);
}
gtk_window_set_title(GTK_WINDOW(st->pr->win), title);
if(abbr){
abbr = abbr+1;
}else{
- abbr = g_strdup_printf("%s",action_name);
+ abbr = g_strdup(action_name);
}
cfg = stats_tree_get_cfg_by_abbr(abbr);
if(cfg){
link = (link_row *)g_malloc(sizeof(link_row));
if (data_link_info->description != NULL) {
link->dlt = data_link_info->dlt;
- link->name = g_strdup_printf("%s", data_link_info->description);
+ link->name = g_strdup(data_link_info->description);
} else {
link->dlt = -1;
link->name = g_strdup_printf("%s (not supported)", data_link_info->name);
device.name = g_strdup(interface_opts.name);
device.display_name = interface_opts.descr ?
g_strdup_printf("%s: %s", device.name, interface_opts.descr) :
- g_strdup_printf("%s", device.name);
+ g_strdup(device.name);
device.hidden = FALSE;
device.selected = TRUE;
device.type = IF_PIPE;
* used.
*/
if (data_link_info->description != NULL) {
- str = g_strdup_printf("%s", data_link_info->description);
+ str = g_strdup(data_link_info->description);
linkr->dlt = data_link_info->dlt;
} else {
str = g_strdup_printf("%s (not supported)", data_link_info->name);
break;
case KHciLoggerDatalinkTypeBCSP:
*err = WTAP_ERR_UNSUPPORTED;
- *err_info = g_strdup_printf("btsnoop: BCSP capture logs unsupported");
+ *err_info = g_strdup("btsnoop: BCSP capture logs unsupported");
return WTAP_OPEN_ERROR;
case KHciLoggerDatalinkTypeH5:
*err = WTAP_ERR_UNSUPPORTED;
- *err_info = g_strdup_printf("btsnoop: H5 capture logs unsupported");
+ *err_info = g_strdup("btsnoop: H5 capture logs unsupported");
return WTAP_OPEN_ERROR;
case KHciLoggerDatalinkLinuxMonitor:
file_encap=WTAP_ENCAP_BLUETOOTH_LINUX_MONITOR;
break;
case KHciLoggerDatalinkBlueZ5Simulator:
*err = WTAP_ERR_UNSUPPORTED;
- *err_info = g_strdup_printf("btsnoop: BlueZ 5 Simulator capture logs unsupported");
+ *err_info = g_strdup("btsnoop: BlueZ 5 Simulator capture logs unsupported");
return WTAP_OPEN_ERROR;
default:
*err = WTAP_ERR_UNSUPPORTED;
{
/* If not got any data return error */
*err = WTAP_ERR_BAD_FILE;
- *err_info = g_strdup_printf("dct3trace: record without data");
+ *err_info = g_strdup("dct3trace: record without data");
return FALSE;
}
}
baddata:
*err = WTAP_ERR_BAD_FILE;
- *err_info = g_strdup_printf("dct3trace: record missing mandatory attributes");
+ *err_info = g_strdup("dct3trace: record missing mandatory attributes");
return FALSE;
}
/* If this isn't a pad record, it's a corrupt packet; bail out */
if ((erf_header->type & 0x7F) != ERF_TYPE_PAD) {
*err = WTAP_ERR_BAD_FILE;
- *err_info = g_strdup_printf("erf: File has 0 byte packet");
+ *err_info = g_strdup("erf: File has 0 byte packet");
return FALSE;
}
*/
if (!filetime_to_nstime(&phdr->ts, d)) {
*err = WTAP_ERR_BAD_FILE;
- *err_info = g_strdup_printf("netmon: time stamp outside supported range");
+ *err_info = g_strdup("netmon: time stamp outside supported range");
return FAILURE;
}
}
if (type != REC_VERS) {
*err = WTAP_ERR_BAD_FILE;
- *err_info = g_strdup_printf("ngsniffer: Sniffer file doesn't start with a version record");
+ *err_info = g_strdup("ngsniffer: Sniffer file doesn't start with a version record");
return WTAP_OPEN_ERROR;
}
* There's not enough data to compare.
*/
*err = WTAP_ERR_UNSUPPORTED;
- *err_info = g_strdup_printf("ngsniffer: WAN capture has too-short protocol list");
+ *err_info = g_strdup("ngsniffer: WAN capture has too-short protocol list");
return -1;
}
case WTAP_ENCAP_NFC_LLCP:
if (check_packet_size && packet_size < LLCP_HEADER_LEN) {
*err = WTAP_ERR_BAD_FILE;
- *err_info = g_strdup_printf("pcap: libpcap llcp file too short");
+ *err_info = g_strdup("pcap: libpcap llcp file too short");
return -1;
}
if (!pcap_read_llcp_pseudoheader(fh, &phdr->pseudo_header, err, err_info))
/* We currently only suport one SHB */
if (pn->shb_read == TRUE) {
*err = WTAP_ERR_UNSUPPORTED;
- *err_info = g_strdup_printf("pcapng_read_section_header_block: multiple section header blocks not supported");
+ *err_info = g_strdup("pcapng_read_section_header_block: multiple section header blocks not supported");
return PCAPNG_BLOCK_ERROR;
}
if (0 >= pn->interfaces->len) {
*err = WTAP_ERR_BAD_FILE;
- *err_info = g_strdup_printf("pcapng_read_simple_packet_block: SPB appeared before any IDBs");
+ *err_info = g_strdup("pcapng_read_simple_packet_block: SPB appeared before any IDBs");
return FALSE;
}
iface_info = g_array_index(pn->interfaces, interface_info_t, 0);
wth->phdr.pkt_encap = WTAP_ENCAP_UNKNOWN;
wth->phdr.pkt_tsprec = WTAP_TSPREC_UNKNOWN;
*err = WTAP_ERR_UNSUPPORTED;
- *err_info = g_strdup_printf("pcapng: multi-section files not currently supported");
+ *err_info = g_strdup("pcapng: multi-section files not currently supported");
return FALSE;
case(BLOCK_TYPE_PB):
t = (((guint64) timestamp.upper) << 32) + timestamp.lower;
if (!nsfiletime_to_nstime(&phdr->ts, t)) {
*err = WTAP_ERR_BAD_FILE;
- *err_info = g_strdup_printf("peektagged: time stamp outside supported range");
+ *err_info = g_strdup("peektagged: time stamp outside supported range");
return -1;
}
/* We will need to add code to handle new format */
if (num_items_scanned != 8) {
*err = WTAP_ERR_BAD_FILE;
- *err_info = g_strdup_printf("vms: header line not valid");
+ *err_info = g_strdup("vms: header line not valid");
return FALSE;
}
}
if ( !*p ) {
*err = WTAP_ERR_BAD_FILE;
- *err_info = g_strdup_printf("vms: Length field not valid");
+ *err_info = g_strdup("vms: Length field not valid");
return FALSE;
}
if (!parse_single_hex_dump_line(line, pd, i,
offset, pkt_len - i)) {
*err = WTAP_ERR_BAD_FILE;
- *err_info = g_strdup_printf("vms: hex dump not valid");
+ *err_info = g_strdup("vms: hex dump not valid");
return FALSE;
}
}