opnsense-src/usr.sbin/xntpd/lib/emalloc.c

21 lines
334 B
C
Raw Normal View History

1994-09-29 19:04:24 -04:00
/*
1993-12-21 13:36:48 -05:00
* 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)
1994-09-29 19:04:24 -04:00
u_int size;
1993-12-21 13:36:48 -05:00
{
char *mem;
if ((mem = (char *)malloc(size)) == 0) {
syslog(LOG_ERR, "No more memory!");
exit(1);
}
return mem;
}