From b0ffed92f1956212f7bd5e0d8a69d3b5c906a012 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 19 Dec 2019 10:19:25 +0100 Subject: [PATCH] rpc: Don't check the output of virGetUserRuntimeDirectory() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit virGetUserRuntimeDirectory() *never* *ever* returns NULL, making the checks for it completely unnecessary. Signed-off-by: Fabiano Fidêncio Reviewed-by: Ján Tomko --- src/rpc/virnetsocket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rpc/virnetsocket.c b/src/rpc/virnetsocket.c index b98287e6d7..f072afe857 100644 --- a/src/rpc/virnetsocket.c +++ b/src/rpc/virnetsocket.c @@ -684,8 +684,7 @@ int virNetSocketNewConnectUNIX(const char *path, goto cleanup; } - if (!(rundir = virGetUserRuntimeDirectory())) - goto cleanup; + rundir = virGetUserRuntimeDirectory(); if (virFileMakePathWithMode(rundir, 0700) < 0) { virReportSystemError(errno, -- 2.47.2