mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
util: Don't check the output of virGetUserRuntimeDirectory()
virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the checks for it completely unnecessary. Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
09e993a110
commit
da3b2509bd
@ -182,8 +182,7 @@ virHostdevManagerNew(void)
|
||||
g_autofree char *rundir = NULL;
|
||||
mode_t old_umask;
|
||||
|
||||
if (!(rundir = virGetUserRuntimeDirectory()))
|
||||
return NULL;
|
||||
rundir = virGetUserRuntimeDirectory();
|
||||
|
||||
hostdevMgr->stateDir = g_strdup_printf("%s/hostdevmgr", rundir);
|
||||
|
||||
|
@ -488,8 +488,7 @@ virPidFileConstructPath(bool privileged,
|
||||
}
|
||||
*pidfile = g_strdup_printf("%s/%s.pid", runstatedir, progname);
|
||||
} else {
|
||||
if (!(rundir = virGetUserRuntimeDirectory()))
|
||||
return -1;
|
||||
rundir = virGetUserRuntimeDirectory();
|
||||
|
||||
if (virFileMakePathWithMode(rundir, 0700) < 0) {
|
||||
virReportSystemError(errno,
|
||||
|
Loading…
x
Reference in New Issue
Block a user