From 689a116d187e8f00bca66edad886883a55092adc Mon Sep 17 00:00:00 2001 From: Lei Jitang Date: Mon, 9 Jan 2017 01:56:14 -0500 Subject: [PATCH] Cleanup: remove redundant code Signed-off-by: Lei Jitang --- libcontainer/user/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainer/user/user.go b/libcontainer/user/user.go index 43fd39ef..f258d624 100644 --- a/libcontainer/user/user.go +++ b/libcontainer/user/user.go @@ -343,7 +343,7 @@ func GetExecUser(userSpec string, defaults *ExecUser, passwd, group io.Reader) ( if len(groups) > 0 { // First match wins, even if there's more than one matching entry. user.Gid = groups[0].Gid - } else if groupArg != "" { + } else { // If we can't find a group with the given name, the only other valid // option is if it's a numeric group name with no associated entry in group.