Sign in
nest-open-source
/
nest-learning-thermostat
/
5.1.1
/
tftp-hpa
/
refs/heads/master
/
.
/
tftp-hpa-5.0
/
lib
/
xmalloc.c
blob: 30704f31804754a65c706f12ea1b395723c2c5da [
file
] [
log
] [
blame
] [
edit
]
/*
* 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
;
}