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>
This commit is contained in:
Philippe Mathieu-Daudé 2025-01-30 11:57:43 +01:00 committed by Michael Tokarev
parent ce315328f8
commit 9038ac0c5c
8 changed files with 8 additions and 11 deletions

View file

@ -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);