Fix error build when using GCC 12.0.0 (#609)

Signed-off-by: Fiqri Ardyansyah <fiqri0927936@gmail.com>
This commit is contained in:
Fiqri Ardyansyah
2023-06-09 09:35:16 +07:00
committed by GitHub
parent d95ede1f76
commit 4218aa488f

View File

@@ -67,7 +67,8 @@ static void setup_groups(struct root_profile *profile, struct cred *cred)
return;
}
for (int i = 0; i < ngroups; i++) {
int i;
for (i = 0; i < ngroups; i++) {
gid_t gid = profile->groups[i];
kgid_t kgid = make_kgid(current_user_ns(), gid);
if (!gid_valid(kgid)) {