summary refs log tree commit diff
path: root/malloc/hooks.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2011-09-10 22:12:38 -0400
committerUlrich Drepper <drepper@gmail.com>2011-09-10 22:12:38 -0400
commit8e58439c92250cde8aae7c2313d08578070b95bb (patch)
tree474e45387d9c2688fb047795822cda3094a138e1 /malloc/hooks.c
parent02d46fc4b969e25e4ba0c54aa95fa98d7279bd05 (diff)
downloadglibc-8e58439c92250cde8aae7c2313d08578070b95bb.tar.gz
glibc-8e58439c92250cde8aae7c2313d08578070b95bb.tar.xz
glibc-8e58439c92250cde8aae7c2313d08578070b95bb.zip
Remove MALLOC_FAILURE_ACTION use in malloc
Diffstat (limited to 'malloc/hooks.c')
-rw-r--r--malloc/hooks.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/malloc/hooks.c b/malloc/hooks.c
index 7817ae9d4a..fc46e7d95a 100644
--- a/malloc/hooks.c
+++ b/malloc/hooks.c
@@ -204,7 +204,7 @@ top_check(void)
   new_brk = (char*)(MORECORE (sbrk_size));
   if (new_brk == (char*)(MORECORE_FAILURE))
     {
-      MALLOC_FAILURE_ACTION;
+      __set_errno (ENOMEM);
       return -1;
     }
   /* Call the `morecore' hook if necessary.  */
@@ -225,7 +225,7 @@ malloc_check(size_t sz, const void *caller)
   void *victim;
 
   if (sz+1 == 0) {
-    MALLOC_FAILURE_ACTION;
+    __set_errno (ENOMEM);
     return NULL;
   }
 
@@ -266,7 +266,7 @@ realloc_check(void* oldmem, size_t bytes, const void *caller)
   unsigned char *magic_p;
 
   if (bytes+1 == 0) {
-    MALLOC_FAILURE_ACTION;
+    __set_errno (ENOMEM);
     return NULL;
   }
   if (oldmem == 0) return malloc_check(bytes, NULL);
@@ -334,7 +334,7 @@ memalign_check(size_t alignment, size_t bytes, const void *caller)
   if (alignment <  MINSIZE) alignment = MINSIZE;
 
   if (bytes+1 == 0) {
-    MALLOC_FAILURE_ACTION;
+    __set_errno (ENOMEM);
     return NULL;
   }
   (void)mutex_lock(&main_arena.mutex);