remove -1 check in calloc

This commit is contained in:
Theo Butler
2019-02-13 16:03:38 -05:00
parent 942313fec7
commit 057595a57e
2 changed files with 10 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ extern "C"
{
bool overflow = false;
size_t sz = bits::umul(size, nmemb, overflow);
if (overflow || ((nmemb | size) == (size_t)-1))
if (overflow)
{
errno = ENOMEM;
return nullptr;