diff options
-rw-r--r-- | kernel/sys.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/sys.c b/kernel/sys.c index 119fb0d9e24e..38bc73ede2ba 100644 --- a/kernel/sys.c +++ b/kernel/sys.c | |||
@@ -1363,7 +1363,7 @@ static void groups_sort(struct group_info *group_info) | |||
1363 | /* a simple bsearch */ | 1363 | /* a simple bsearch */ |
1364 | int groups_search(struct group_info *group_info, gid_t grp) | 1364 | int groups_search(struct group_info *group_info, gid_t grp) |
1365 | { | 1365 | { |
1366 | int left, right; | 1366 | unsigned int left, right; |
1367 | 1367 | ||
1368 | if (!group_info) | 1368 | if (!group_info) |
1369 | return 0; | 1369 | return 0; |
@@ -1371,7 +1371,7 @@ int groups_search(struct group_info *group_info, gid_t grp) | |||
1371 | left = 0; | 1371 | left = 0; |
1372 | right = group_info->ngroups; | 1372 | right = group_info->ngroups; |
1373 | while (left < right) { | 1373 | while (left < right) { |
1374 | int mid = (left+right)/2; | 1374 | unsigned int mid = (left+right)/2; |
1375 | int cmp = grp - GROUP_AT(group_info, mid); | 1375 | int cmp = grp - GROUP_AT(group_info, mid); |
1376 | if (cmp > 0) | 1376 | if (cmp > 0) |
1377 | left = mid + 1; | 1377 | left = mid + 1; |