aboutsummaryrefslogtreecommitdiffstats
path: root/epan/disabled_protos.c
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2021-12-16 18:06:18 +0000
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2021-12-19 19:29:53 +0000
commitc5a19582e4e18605e8528cd999221444f7ece318 (patch)
treed4206130200f56796a10eb2178ba8cefda1e7087 /epan/disabled_protos.c
parent737d1dc125cc82851dee26004f9dc7922ed27c03 (diff)
epan: Convert to use stdio.h from GLib
Replace: g_snprintf() -> snprintf() g_vsnprintf() -> vsnprintf() g_strdup_printf() -> ws_strdup_printf() g_strdup_vprintf() -> ws_strdup_vprintf() This is more portable, user-friendly and faster on platforms where GLib does not like the native I/O. Adjust the format string to use macros from intypes.h.
Diffstat (limited to 'epan/disabled_protos.c')
-rw-r--r--epan/disabled_protos.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/disabled_protos.c b/epan/disabled_protos.c
index 41b4cc2dd0..4cf4772b97 100644
--- a/epan/disabled_protos.c
+++ b/epan/disabled_protos.c
@@ -181,7 +181,7 @@ save_protos_list(char **pref_path_return, int *errno_return, const char* filenam
/* Write to "XXX.new", and rename if that succeeds.
That means we don't trash the file if we fail to write it out
completely. */
- ff_path_new = g_strdup_printf("%s.new", ff_path);
+ ff_path_new = ws_strdup_printf("%s.new", ff_path);
if ((ff = ws_fopen(ff_path_new, "w")) == NULL) {
*pref_path_return = ff_path;
@@ -809,7 +809,7 @@ save_disabled_heur_dissector_list(char **pref_path_return, int *errno_return)
/* Write to "XXX.new", and rename if that succeeds.
That means we don't trash the file if we fail to write it out
completely. */
- ff_path_new = g_strdup_printf("%s.new", ff_path);
+ ff_path_new = ws_strdup_printf("%s.new", ff_path);
if ((ff = ws_fopen(ff_path_new, "w")) == NULL) {
*pref_path_return = ff_path;