]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virFileAccessibleAs: Remove redundant forkRet
authorRadostin Stoyanov <rstoyanov1@gmail.com>
Tue, 5 Jun 2018 07:11:33 +0000 (08:11 +0100)
committerJán Tomko <jtomko@redhat.com>
Tue, 5 Jun 2018 07:18:47 +0000 (09:18 +0200)
The variable forkRet is not used after commit 25f8781

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/util/virfile.c

index 523241f64fd2610e179a53bf94317f473afb67b7..a2c4cebb5676c4294ff3ba031bafbff97656e589 100644 (file)
@@ -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;