소스 검색

Use MAP_FAILED.

Eric Andersen 25 년 전
부모
커밋
3f549ec279
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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;