1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-22 11:17:19 +00:00
freebsd/usr.sbin/xntpd/lib/emalloc.c
1994-09-29 23:04:24 +00:00

21 lines
334 B
C

/*
* emalloc - return new memory obtained from the system. Belch if none.
*/
#include "ntp_types.h"
#include "ntp_malloc.h"
#include "ntp_stdlib.h"
#include "ntp_syslog.h"
char *
emalloc(size)
u_int size;
{
char *mem;
if ((mem = (char *)malloc(size)) == 0) {
syslog(LOG_ERR, "No more memory!");
exit(1);
}
return mem;
}