aboutsummaryrefslogtreecommitdiffstats
path: root/devel/cbmc/files/patch-minisat-2.2.1_minisat_mtl_XAlloc.h
blob: 8c8b9680bf6d2ef6fc99e917452ad925651275a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- minisat-2.2.1/minisat/mtl/XAlloc.h.orig	2011-02-21 13:31:17 UTC
+++ minisat-2.2.1/minisat/mtl/XAlloc.h
@@ -21,7 +21,6 @@ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OT
 #ifndef Minisat_XAlloc_h
 #define Minisat_XAlloc_h
 
-#include <errno.h>
 #include <stdlib.h>
 
 namespace Minisat {
@@ -33,7 +32,7 @@ static inline void* xrealloc(void *ptr, size_t size)
 static inline void* xrealloc(void *ptr, size_t size)
 {
     void* mem = realloc(ptr, size);
-    if (mem == NULL && errno == ENOMEM){
+    if (mem == NULL){
         throw OutOfMemoryException();
     }else
         return mem;