Explorar el Código

Use MAP_FAILED.

Eric Andersen hace 25 años
padre
commit
3f549ec279
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      libc/stdlib/malloc-simple/alloc.c

+ 1 - 1
libc/stdlib/malloc-simple/alloc.c

@@ -74,7 +74,7 @@ void *malloc(size_t len)
 #endif
 						    );
 
-	if (result == (void *) -1)
+	if (result == MAP_FAILED)
 		return 0;
 
 	return result;