From 1fbf2665e6773d87657c2a1654d9bf272a4f1ec0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Wed, 20 Apr 2022 17:26:21 +0400 Subject: util: replace qemu_get_local_state_pathname() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simplify the function to only return the directory path. Callers are adjusted to use the GLib function to build paths, g_build_filename(). Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20220420132624.2439741-39-marcandre.lureau@redhat.com> --- util/oslib-win32.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'util/oslib-win32.c') diff --git a/util/oslib-win32.c b/util/oslib-win32.c index b897d75..9c1e812 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -235,7 +235,7 @@ int qemu_get_thread_id(void) } char * -qemu_get_local_state_pathname(const char *relative_pathname) +qemu_get_local_state_dir(void) { HRESULT result; char base_path[MAX_PATH+1] = ""; @@ -247,8 +247,7 @@ qemu_get_local_state_pathname(const char *relative_pathname) g_critical("CSIDL_COMMON_APPDATA unavailable: %ld", (long)result); abort(); } - return g_strdup_printf("%s" G_DIR_SEPARATOR_S "%s", base_path, - relative_pathname); + return g_strdup(base_path); } void qemu_set_tty_echo(int fd, bool echo) -- cgit v1.1