summaryrefslogtreecommitdiff
path: root/new/alloc_darwin.m
diff options
context:
space:
mode:
Diffstat (limited to 'new/alloc_darwin.m')
-rw-r--r--new/alloc_darwin.m4
1 files changed, 2 insertions, 2 deletions
diff --git a/new/alloc_darwin.m b/new/alloc_darwin.m
index c347e7a..8f539af 100644
--- a/new/alloc_darwin.m
+++ b/new/alloc_darwin.m
@@ -7,7 +7,7 @@ void *uiAlloc(size_t size, const char *type)
void *out;
out = malloc(size);
- if (out != NULL) {
+ if (out == NULL) {
fprintf(stderr, "memory exhausted in uiAlloc() allocating %s\n", type);
abort();
}
@@ -24,7 +24,7 @@ void *uiRealloc(void *p, size_t size, const char *type)
if (p == NULL)
return uiAlloc(size, type);
out = realloc(p, size);
- if (out != NULL) {
+ if (out == NULL) {
fprintf(stderr, "memory exhausted in uiRealloc() reallocating %s\n", type);
abort();
}