diff options
author | Daniel Henrique Barboza <danielhb413@gmail.com> | 2020-01-20 15:11:39 +0100 |
---|---|---|
committer | Greg Kurz <groug@kaod.org> | 2020-01-20 15:11:39 +0100 |
commit | ff59c5ee78f11f0667c575b2b6c26a7d954658fb (patch) | |
tree | 280cc4fb3a3ca108ab034777e06b02b596dc871f /fsdev | |
parent | 16724a173049ac29c7b5ade741da93a0f46edff7 (diff) |
virtfs-proxy-helper.c: remove 'err_out' label in setugid()
'err_out' can be removed and be replaced by 'return -errno'
in its only instance in the function.
CC: Greg Kurz <groug@kaod.org>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Acked-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Greg Kurz <groug@kaod.org>
Diffstat (limited to 'fsdev')
-rw-r--r-- | fsdev/virtfs-proxy-helper.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index 0d4de49dcf..aa1ab2590d 100644 --- a/fsdev/virtfs-proxy-helper.c +++ b/fsdev/virtfs-proxy-helper.c @@ -287,8 +287,7 @@ static int setugid(int uid, int gid, int *suid, int *sgid) *sgid = getegid(); if (setresgid(-1, gid, *sgid) == -1) { - retval = -errno; - goto err_out; + return -errno; } if (setresuid(-1, uid, *suid) == -1) { @@ -322,7 +321,6 @@ err_sgid: if (setresgid(-1, *sgid, *sgid) == -1) { abort(); } -err_out: return retval; } |