diff options
-rw-r--r-- | epan/dissectors/packet-dcerpc-nt.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-ipmi-se.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-mq.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-q2931.c | 6 | ||||
-rw-r--r-- | epan/dissectors/packet-rtps2.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-wccp.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-xml.c | 2 | ||||
-rw-r--r-- | epan/filesystem.c | 2 | ||||
-rw-r--r-- | file.c | 4 |
9 files changed, 14 insertions, 16 deletions
diff --git a/epan/dissectors/packet-dcerpc-nt.c b/epan/dissectors/packet-dcerpc-nt.c index f2d7bc6064..c9135c11d7 100644 --- a/epan/dissectors/packet-dcerpc-nt.c +++ b/epan/dissectors/packet-dcerpc-nt.c @@ -118,7 +118,7 @@ dissect_ndr_counted_string_helper(tvbuff_t *tvb, int offset, if (add_subtree) { item = proto_tree_add_text( - tree, tvb, offset, 0, + tree, tvb, offset, 0, "%s", proto_registrar_get_name(hf_index)); subtree = proto_item_add_subtree(item, ett_nt_counted_string); @@ -185,7 +185,7 @@ dissect_ndr_counted_byte_array_cb(tvbuff_t *tvb, int offset, if (di->conformant_run) return offset; - item = proto_tree_add_text(tree, tvb, offset, 0, + item = proto_tree_add_text(tree, tvb, offset, 0, "%s", proto_registrar_get_name(hf_index)); subtree = proto_item_add_subtree(item, ett_nt_counted_byte_array); @@ -291,7 +291,7 @@ dissect_ndr_counted_ascii_string_cb(tvbuff_t *tvb, int offset, if (di->conformant_run) return offset; - item = proto_tree_add_text(tree, tvb, offset, 0, + item = proto_tree_add_text(tree, tvb, offset, 0, "%s", proto_registrar_get_name(hf_index)); subtree = proto_item_add_subtree(item, ett_nt_counted_ascii_string); diff --git a/epan/dissectors/packet-ipmi-se.c b/epan/dissectors/packet-ipmi-se.c index 1e030c9349..79ab9b3ee5 100644 --- a/epan/dissectors/packet-ipmi-se.c +++ b/epan/dissectors/packet-ipmi-se.c @@ -2237,7 +2237,7 @@ rq11(tvbuff_t *tvb, proto_tree *tree) val = tvb_get_guint8(tvb, 0); proto_tree_add_uint_format(tree, hf_ipmi_se_11_rq_timeout, tvb, 0, 1, - val, val_to_str(val, vals_11_pef_timer, "Arm Timer for: %d sec")); + val, "%s", val_to_str(val, vals_11_pef_timer, "Arm Timer for: %d sec")); } static void @@ -2247,7 +2247,7 @@ rs11(tvbuff_t *tvb, proto_tree *tree) val = tvb_get_guint8(tvb, 0); proto_tree_add_uint_format(tree, hf_ipmi_se_11_rs_timeout, tvb, 0, 1, - val, val_to_str(val, vals_11_pef_timer, "Present Timer Countdown value: %d sec")); + val, "%s", val_to_str(val, vals_11_pef_timer, "Present Timer Countdown value: %d sec")); } /* Set PEF Configuration Parameters. diff --git a/epan/dissectors/packet-mq.c b/epan/dissectors/packet-mq.c index a1e52ca638..701f5f2291 100644 --- a/epan/dissectors/packet-mq.c +++ b/epan/dissectors/packet-mq.c @@ -2279,7 +2279,7 @@ dissect_mq_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) structId = tvb_get_ntohl(tvb, offset); if (tree) { - proto_tree_add_text(mqroot_tree, tvb, offset, -1, val_to_str(structId, mq_structid_vals, "Unknown (0x%08x)")); + proto_tree_add_text(mqroot_tree, tvb, offset, -1, "%s", val_to_str(structId, mq_structid_vals, "Unknown (0x%08x)")); } } } diff --git a/epan/dissectors/packet-q2931.c b/epan/dissectors/packet-q2931.c index 9b65b903c7..2cf75e7c28 100644 --- a/epan/dissectors/packet-q2931.c +++ b/epan/dissectors/packet-q2931.c @@ -1990,17 +1990,17 @@ dissect_q2931_ie(tvbuff_t *tvb, int offset, int len, proto_tree *tree, "Information element extension: 0x%02x", info_element_ext); ie_ext_tree = proto_item_add_subtree(ti, ett_q2931_ie_ext); - proto_tree_add_text(ie_ext_tree, tvb, offset + 1, 1, + proto_tree_add_text(ie_ext_tree, tvb, offset + 1, 1, "%s", decode_enumerated_bitfield(info_element_ext, Q2931_IE_COMPAT_CODING_STD, 8, coding_std_vals, "Coding standard: %s")); - proto_tree_add_text(ie_ext_tree, tvb, offset + 1, 1, + proto_tree_add_text(ie_ext_tree, tvb, offset + 1, 1, "%s", decode_boolean_bitfield(info_element_ext, Q2931_IE_COMPAT_FOLLOW_INST, 8, "Follow explicit error handling instructions", "Regular error handling procedures apply")); if (info_element_ext & Q2931_IE_COMPAT_FOLLOW_INST) { - proto_tree_add_text(ie_ext_tree, tvb, offset + 1, 1, + proto_tree_add_text(ie_ext_tree, tvb, offset + 1, 1, "%s", decode_enumerated_bitfield(info_element_ext, Q2931_IE_COMPAT_ACTION_IND, 8, ie_action_ind_vals, diff --git a/epan/dissectors/packet-rtps2.c b/epan/dissectors/packet-rtps2.c index 6d1312c3eb..44ebcc4947 100644 --- a/epan/dissectors/packet-rtps2.c +++ b/epan/dissectors/packet-rtps2.c @@ -3747,7 +3747,7 @@ static gint dissect_parameter_sequence(proto_tree *tree, proto_tree_add_text(rtps_parameter_tree, tvb, offset, - param_length, + param_length, "%s", buffer); break; } diff --git a/epan/dissectors/packet-wccp.c b/epan/dissectors/packet-wccp.c index 36f8a01074..7d42908dae 100644 --- a/epan/dissectors/packet-wccp.c +++ b/epan/dissectors/packet-wccp.c @@ -471,7 +471,7 @@ dissect_wccp2_info(tvbuff_t *tvb, int offset, guint16 length, break; } - ti = proto_tree_add_text(wccp_tree, tvb, offset, item_length + 4, + ti = proto_tree_add_text(wccp_tree, tvb, offset, item_length + 4, "%s", val_to_str(type, info_type_vals, "Unknown info type (%u)")); info_tree = proto_item_add_subtree(ti, ett); proto_tree_add_text(info_tree, tvb, offset, 2, diff --git a/epan/dissectors/packet-xml.c b/epan/dissectors/packet-xml.c index 9b6f6453e4..06de352c1a 100644 --- a/epan/dissectors/packet-xml.c +++ b/epan/dissectors/packet-xml.c @@ -292,7 +292,7 @@ static void after_xmlpi(void* tvbparse_data, const void* wanted_data _U_, tvbpar xml_frame_t* current_frame = g_ptr_array_index(stack,stack->len - 1); proto_tree_add_text(current_frame->tree, - tok->tvb, tok->offset, tok->len, + tok->tvb, tok->offset, tok->len, "%s", tvb_format_text(tok->tvb,tok->offset,tok->len)); if (stack->len > 1) { diff --git a/epan/filesystem.c b/epan/filesystem.c index 4c6fc3c461..e1885e3806 100644 --- a/epan/filesystem.c +++ b/epan/filesystem.c @@ -951,7 +951,7 @@ get_persconffile_dir(const gchar *profilename) persconffile_profile_dir = g_strdup_printf ("%s%s%s", get_profiles_dir (), G_DIR_SEPARATOR_S, profilename); } else { - persconffile_profile_dir = g_strdup_printf (get_persconffile_dir_no_profile ()); + persconffile_profile_dir = g_strdup (get_persconffile_dir_no_profile ()); } return persconffile_profile_dir; @@ -1153,7 +1153,6 @@ cf_merge_files(char **out_filenamep, int in_file_count, int err_fileno; int i; char errmsg_errno[1024+1]; - gchar err_str[2048+1]; const char *errmsg; gboolean got_read_error = FALSE, got_write_error = FALSE; gint64 data_offset; @@ -1345,8 +1344,7 @@ cf_merge_files(char **out_filenamep, int in_file_count, errmsg = errmsg_errno; break; } - g_snprintf(err_str, sizeof err_str, errmsg, in_files[i].filename); - simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, err_str); + simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, errmsg, in_files[i].filename); } } } |