From ff59c5ee78f11f0667c575b2b6c26a7d954658fb Mon Sep 17 00:00:00 2001 From: Daniel Henrique Barboza Date: Mon, 20 Jan 2020 15:11:39 +0100 Subject: 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 Signed-off-by: Daniel Henrique Barboza Acked-by: Greg Kurz Signed-off-by: Greg Kurz --- fsdev/virtfs-proxy-helper.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index 0d4de49..aa1ab25 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; } -- cgit v1.1