summaryrefslogtreecommitdiffstats
path: root/xmalloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'xmalloc.c')
-rw-r--r--xmalloc.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/xmalloc.c b/xmalloc.c
index 8d42a7c4..75ae4e24 100644
--- a/xmalloc.c
+++ b/xmalloc.c
@@ -37,7 +37,8 @@ void *xmalloc(size_t len)
char *msg;
if (rv)
return rv;
- msg = Name ": memory allocation failure - aborting\n";
+ msg = ": memory allocation failure - aborting\n";
+ write(2, Name, strlen(Name));
exit(4+!!write(2, msg, strlen(msg)));
}
@@ -47,7 +48,8 @@ void *xrealloc(void *ptr, size_t len)
char *msg;
if (rv)
return rv;
- msg = Name ": memory allocation failure - aborting\n";
+ msg = ": memory allocation failure - aborting\n";
+ write(2, Name, strlen(Name));
exit(4+!!write(2, msg, strlen(msg)));
}
@@ -57,7 +59,8 @@ void *xcalloc(size_t num, size_t size)
char *msg;
if (rv)
return rv;
- msg = Name ": memory allocation failure - aborting\n";
+ msg = ": memory allocation failure - aborting\n";
+ write(2, Name, strlen(Name));
exit(4+!!write(2, msg, strlen(msg)));
}
@@ -67,6 +70,7 @@ char *xstrdup(const char *str)
char *msg;
if (rv)
return rv;
- msg = Name ": memory allocation failure - aborting\n";
+ msg = ": memory allocation failure - aborting\n";
+ write(2, Name, strlen(Name));
exit(4+!!write(2, msg, strlen(msg)));
}