summaryrefslogtreecommitdiff
path: root/gnu/libexec/uucp/libuucp/xmall.c
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/libexec/uucp/libuucp/xmall.c')
-rw-r--r--gnu/libexec/uucp/libuucp/xmall.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gnu/libexec/uucp/libuucp/xmall.c b/gnu/libexec/uucp/libuucp/xmall.c
new file mode 100644
index 00000000000..4aac23748c8
--- /dev/null
+++ b/gnu/libexec/uucp/libuucp/xmall.c
@@ -0,0 +1,18 @@
+/* xmalloc.c
+ Allocate a block of memory without fail. */
+
+#include "uucp.h"
+
+#include "uudefs.h"
+
+pointer
+xmalloc (c)
+ size_t c;
+{
+ pointer pret;
+
+ pret = malloc (c);
+ if (pret == NULL && c != 0)
+ ulog (LOG_FATAL, "Out of memory");
+ return pret;
+}