bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnulib] alloca.c unnecessary test removed


From: Paul Eggert
Subject: [Bug-gnulib] alloca.c unnecessary test removed
Date: 26 Oct 2003 23:18:03 -0800
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

Now that alloca is using xmalloc rather than malloc, it no longer
needs to test whether the result of calling the allocator is NULL.
So I installed this obvious change:

2003-10-26  Paul Eggert  <address@hidden>

        * alloc.c (alloca): xmalloc cannot return NULL, so don't test for that.

Index: alloca.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/alloca.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -p -u -r1.11 -r1.12
--- alloca.c    8 Sep 2003 22:58:10 -0000       1.11
+++ alloca.c    27 Oct 2003 07:12:11 -0000      1.12
@@ -204,9 +204,6 @@ alloca (size_t size)
 
     new = xmalloc (combined_size);
 
-    if (new == 0)
-      abort();
-
     ((header *) new)->h.next = last_alloca_header;
     ((header *) new)->h.deep = depth;
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]