Fix MSVC warning in malloc.cc

This commit is contained in:
Matthew Parkinson
2019-01-23 11:03:43 +00:00
parent e51f1c3d50
commit 8d074468ae

View File

@@ -140,7 +140,7 @@ extern "C"
for (; sc < NUM_SIZECLASSES; sc++)
{
size = sizeclass_to_size(sc);
if ((size & -size) >= alignment)
if ((size & (~size - 1)) >= alignment)
{
return SNMALLOC_NAME_MANGLE(aligned_alloc)(alignment, size);
}