summaryrefslogtreecommitdiff
path: root/usr.bin/xlint/lint1/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/xlint/lint1/mem.c')
-rw-r--r--usr.bin/xlint/lint1/mem.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/usr.bin/xlint/lint1/mem.c b/usr.bin/xlint/lint1/mem.c
index e91772d85d7..0fce3f26362 100644
--- a/usr.bin/xlint/lint1/mem.c
+++ b/usr.bin/xlint/lint1/mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mem.c,v 1.3 2005/11/19 03:35:27 cloder Exp $ */
+/* $OpenBSD: mem.c,v 1.4 2006/03/08 07:18:51 moritz Exp $ */
/* $NetBSD: mem.c,v 1.2 1995/07/03 21:24:24 cgd Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: mem.c,v 1.3 2005/11/19 03:35:27 cloder Exp $";
+static char rcsid[] = "$OpenBSD: mem.c,v 1.4 2006/03/08 07:18:51 moritz Exp $";
#endif
#include <stdlib.h>
@@ -48,7 +48,7 @@ xmalloc(size_t s)
void *p;
if ((p = malloc(s)) == NULL)
- nomem();
+ err(1, NULL);
return (p);
}
@@ -58,7 +58,7 @@ xcalloc(size_t n, size_t s)
void *p;
if ((p = calloc(n, s)) == NULL)
- nomem();
+ err(1, NULL);
return (p);
}
@@ -66,7 +66,7 @@ void *
xrealloc(void *p, size_t s)
{
if ((p = realloc(p, s)) == NULL)
- nomem();
+ err(1, NULL);
return (p);
}
@@ -76,12 +76,6 @@ xstrdup(const char *s)
char *s2;
if ((s2 = strdup(s)) == NULL)
- nomem();
+ err(1, NULL);
return (s2);
}
-
-void
-nomem(void)
-{
- errx(1, "virtual memory exhausted");
-}