Remove redundant checks

We can never have an array of more than SIZE_MAX/2/sizeof(gid_t)
gid_t's.
This commit is contained in:
sin 2015-02-28 20:49:00 +00:00
parent de499b92ba
commit e71d1fd257
2 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ __fortify_poll(struct pollfd *fds, nfds_t nfds, int timeout)
{
__typeof__(sizeof 0) bos = __builtin_object_size(fds, 0);
if (bos != -1 && nfds > bos / sizeof(struct pollfd))
if (nfds > bos / sizeof(struct pollfd))
__builtin_trap();
return poll(fds, nfds, timeout);
}

View File

@ -46,7 +46,7 @@ __fortify_getgroups(int len, gid_t *set)
{
size_t bos = __builtin_object_size(set, 0);
if (bos != -1 && len > bos / sizeof(gid_t))
if (len > bos / sizeof(gid_t))
__builtin_trap();
return getgroups(len, set);
}