From: Radostin Stoyanov Date: Tue, 5 Jun 2018 07:11:33 +0000 (+0100) Subject: virFileAccessibleAs: Remove redundant forkRet X-Git-Tag: v4.5.0-rc1~275 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e9d0ad7a0b2c1a4c28f1c634d42ae329ce22445;p=thirdparty%2Flibvirt.git virFileAccessibleAs: Remove redundant forkRet The variable forkRet is not used after commit 25f8781 Signed-off-by: Radostin Stoyanov Reviewed-by: Ján Tomko Signed-off-by: Ján Tomko --- diff --git a/src/util/virfile.c b/src/util/virfile.c index 523241f64f..a2c4cebb56 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -2117,7 +2117,6 @@ virFileAccessibleAs(const char *path, int mode, { pid_t pid = 0; int status, ret = 0; - int forkRet = 0; gid_t *groups; int ngroups; @@ -2152,15 +2151,6 @@ virFileAccessibleAs(const char *path, int mode, return 0; } - /* child. - * Return positive value here. Parent - * will change it to negative one. */ - - if (forkRet < 0) { - ret = errno; - goto childerror; - } - if (virSetUIDGID(uid, gid, groups, ngroups) < 0) { ret = errno; goto childerror;