提交 4e9d0ad7 编写于 作者: R Radostin Stoyanov 提交者: Ján Tomko

virFileAccessibleAs: Remove redundant forkRet

The variable forkRet is not used after commit 25f87817Signed-off-by: NRadostin Stoyanov <rstoyanov1@gmail.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
Signed-off-by: NJán Tomko <jtomko@redhat.com>
上级 6549c3a4
...@@ -2117,7 +2117,6 @@ virFileAccessibleAs(const char *path, int mode, ...@@ -2117,7 +2117,6 @@ virFileAccessibleAs(const char *path, int mode,
{ {
pid_t pid = 0; pid_t pid = 0;
int status, ret = 0; int status, ret = 0;
int forkRet = 0;
gid_t *groups; gid_t *groups;
int ngroups; int ngroups;
...@@ -2152,15 +2151,6 @@ virFileAccessibleAs(const char *path, int mode, ...@@ -2152,15 +2151,6 @@ virFileAccessibleAs(const char *path, int mode,
return 0; 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) { if (virSetUIDGID(uid, gid, groups, ngroups) < 0) {
ret = errno; ret = errno;
goto childerror; goto childerror;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册