aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
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 /file.c
parentf984def50cfb20c5a47f7ac41b7b72bd270f2bb7 (diff)
Replace g_strdup_printf() with ws_strdup_printf()
Use macros from inttypes.h.
Diffstat (limited to 'file.c')
-rw-r--r--file.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/file.c b/file.c
index cc95946e4c..a1fb7d3301 100644
--- a/file.c
+++ b/file.c
@@ -4536,7 +4536,7 @@ cf_save_records(capture_file *cf, const char *fname, guint save_format,
to a new file and, if the write succeeds, renaming the
new file on top of the old file. */
if (file_exists(fname)) {
- fname_new = g_strdup_printf("%s~", fname);
+ fname_new = ws_strdup_printf("%s~", fname);
if (!copy_file_binary_mode(cf->filename, fname_new))
goto fail;
} else {
@@ -4572,7 +4572,7 @@ cf_save_records(capture_file *cf, const char *fname, guint save_format,
file. (If the existing file is the current capture file,
we *HAVE* to do that, otherwise we're overwriting the file
from which we're reading the packets that we're writing!) */
- fname_new = g_strdup_printf("%s~", fname);
+ fname_new = ws_strdup_printf("%s~", fname);
pdh = wtap_dump_open(fname_new, save_format, compression_type, &params,
&err, &err_info);
} else {
@@ -4831,7 +4831,7 @@ cf_export_specified_packets(capture_file *cf, const char *fname,
file. (If the existing file is the current capture file,
we *HAVE* to do that, otherwise we're overwriting the file
from which we're reading the packets that we're writing!) */
- fname_new = g_strdup_printf("%s~", fname);
+ fname_new = ws_strdup_printf("%s~", fname);
pdh = wtap_dump_open(fname_new, save_format, compression_type, &params,
&err, &err_info);
} else {