Browse Source

LibC: Actually, malloc() can return null so don't lie about that.

Andreas Kling 6 years ago
parent
commit
56f0a30f9b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      LibC/stdlib.h

+ 3 - 3
LibC/stdlib.h

@@ -9,10 +9,10 @@ __BEGIN_DECLS
 #define EXIT_FAILURE 1
 #define MB_CUR_MAX 1
 
-[[gnu::malloc, gnu::returns_nonnull, gnu::alloc_size(1)]] void* malloc(size_t);
-[[gnu::malloc, gnu::returns_nonnull, gnu::alloc_size(1, 2)]] void* calloc(size_t nmemb, size_t);
+[[gnu::malloc, gnu::alloc_size(1)]] void* malloc(size_t);
+[[gnu::malloc, gnu::alloc_size(1, 2)]] void* calloc(size_t nmemb, size_t);
 void free(void*);
-[[gnu::returns_nonnull]] void* realloc(void *ptr, size_t);
+void* realloc(void *ptr, size_t);
 char* getenv(const char* name);
 int atoi(const char*);
 long atol(const char*);