Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/logging/log_daemon.c | 8 ++++---- src/logging/log_daemon_config.c | 2 +- src/logging/log_manager.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/logging/log_daemon.c b/src/logging/log_daemon.c index 2304c310d1..268d3c62b9 100644 --- a/src/logging/log_daemon.c +++ b/src/logging/log_daemon.c @@ -405,8 +405,8 @@ virLogDaemonUnixSocketPaths(bool privileged, } umask(old_umask); - virAsprintf(sockfile, "%s/virtlogd-sock", rundir); - virAsprintf(adminSockfile, "%s/virtlogd-admin-sock", rundir); + *sockfile = g_strdup_printf("%s/virtlogd-sock", rundir); + *adminSockfile = g_strdup_printf("%s/virtlogd-admin-sock", rundir); VIR_FREE(rundir); } @@ -632,7 +632,7 @@ virLogDaemonExecRestartStatePath(bool privileged, } umask(old_umask); - virAsprintf(state_file, "%s/virtlogd-restart-exec.json", rundir); + *state_file = g_strdup_printf("%s/virtlogd-restart-exec.json", rundir); VIR_FREE(rundir); } @@ -649,7 +649,7 @@ virLogDaemonGetExecRestartMagic(void) { char *ret; - virAsprintf(&ret, "%lld", (long long int)getpid()); + ret = g_strdup_printf("%lld", (long long int)getpid()); return ret; } diff --git a/src/logging/log_daemon_config.c b/src/logging/log_daemon_config.c index a0e4c4dd1b..0cf9729e7f 100644 --- a/src/logging/log_daemon_config.c +++ b/src/logging/log_daemon_config.c @@ -47,7 +47,7 @@ virLogDaemonConfigFilePath(bool privileged, char **configfile) if (!(configdir = virGetUserConfigDirectory())) goto error; - virAsprintf(configfile, "%s/virtlogd.conf", configdir); + *configfile = g_strdup_printf("%s/virtlogd.conf", configdir); VIR_FREE(configdir); } diff --git a/src/logging/log_manager.c b/src/logging/log_manager.c index 024fe9b592..e191093272 100644 --- a/src/logging/log_manager.c +++ b/src/logging/log_manager.c @@ -52,7 +52,7 @@ virLogManagerDaemonPath(bool privileged) if (!(rundir = virGetUserRuntimeDirectory())) return NULL; - virAsprintf(&path, "%s/virtlogd-sock", rundir); + path = g_strdup_printf("%s/virtlogd-sock", rundir); VIR_FREE(rundir); } -- 2.21.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list