tftp-hpa-google/lib/xmalloc.c
H. Peter Anvin 22accddda0 Reformat the source code
The source code was a mix of different styles; normalize on NASM
style; basically K&R style with 4 space indentation.
2008-07-08 17:14:44 -04:00

20 lines
252 B
C

/*
* xmalloc.c
*
* Simple error-checking version of malloc()
*
*/
#include "config.h"
void *xmalloc(size_t size)
{
void *p = malloc(size);
if (!p) {
fprintf(stderr, "Out of memory!\n");
exit(128);
}
return p;
}