[libvirt] [PATCHv2] virFileAccessibleAs: Remove redundant forkRet

Radostin Stoyanov posted 1 patch 5 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180605071133.23720-1-rstoyanov1@gmail.com
Test syntax-check passed
src/util/virfile.c | 10 ----------
1 file changed, 10 deletions(-)
[libvirt] [PATCHv2] virFileAccessibleAs: Remove redundant forkRet
Posted by Radostin Stoyanov 5 years, 10 months ago
The variable forkRet is not used after commit 25f8781

Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
---
 src/util/virfile.c | 10 ----------
 1 file changed, 10 deletions(-)

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;
-- 
2.17.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCHv2] virFileAccessibleAs: Remove redundant forkRet
Posted by Ján Tomko 5 years, 10 months ago
On Tue, Jun 05, 2018 at 08:11:33AM +0100, Radostin Stoyanov wrote:
>The variable forkRet is not used after commit 25f8781
>
>Signed-off-by: Radostin Stoyanov <rstoyanov1@gmail.com>
>---
> src/util/virfile.c | 10 ----------
> 1 file changed, 10 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

And pushed.

Jano
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list