aboutsummaryrefslogtreecommitdiff
path: root/trace
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-30 11:57:43 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2025-02-14 08:49:06 +0300
commit9038ac0c5c4ce8f6cf49e1146a79b633dc534b7d (patch)
treedee0e6f58969a5d371f9f6cebd074511d65cbb65 /trace
parentce315328f8e9bf5201db4217f3ffe0784110aa4b (diff)
downloadqemu-9038ac0c5c4ce8f6cf49e1146a79b633dc534b7d.zip
qemu-9038ac0c5c4ce8f6cf49e1146a79b633dc534b7d.tar.gz
qemu-9038ac0c5c4ce8f6cf49e1146a79b633dc534b7d.tar.bz2
overall: Remove unnecessary g_strdup_printf() calls
Replace g_strdup_printf("%s", value) -> g_strdup(value) to avoid unnecessary string formatting. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'trace')
-rw-r--r--trace/simple.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trace/simple.c b/trace/simple.c
index 18af590..c0aba00 100644
--- a/trace/simple.c
+++ b/trace/simple.c
@@ -366,7 +366,7 @@ void st_set_trace_file(const char *file)
/* Type cast needed for Windows where getpid() returns an int. */
trace_file_name = g_strdup_printf(CONFIG_TRACE_FILE "-" FMT_pid, (pid_t)getpid());
} else {
- trace_file_name = g_strdup_printf("%s", file);
+ trace_file_name = g_strdup(file);
}
st_set_trace_file_enabled(saved_enable);