diff --git a/kernel/groups.c b/kernel/groups.c index 1cc476d52dd3b6..defa73879ac313 100644 --- a/kernel/groups.c +++ b/kernel/groups.c @@ -142,7 +142,7 @@ int groups_search(const struct group_info *group_info, gid_t grp) left = 0; right = group_info->ngroups; while (left < right) { - unsigned int mid = (left+right)/2; + unsigned int mid = left (right - left)/2; if (grp > GROUP_AT(group_info, mid)) left = mid + 1; else if (grp < GROUP_AT(group_info, mid))