Explorar o código

remove redundant check in memalign

the case where mem was already aligned is handled earlier in the
function now.
Rich Felker %!s(int64=11) %!d(string=hai) anos
pai
achega
4a30ba5ca4
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/malloc/memalign.c

+ 1 - 1
src/malloc/memalign.c

@@ -50,7 +50,7 @@ void *__memalign(size_t align, size_t len)
 	((size_t *)new)[-1] = header&7 | end-new;
 	((size_t *)end)[-2] = footer&7 | end-new;
 
-	if (new != mem) free(mem);
+	free(mem);
 	return new;
 }