Sign in
nest-open-source
/
nest-learning-thermostat
/
5.0.2
/
tftp-hpa
/
9ff303d2392d4001e76f6211ad80bfb1b54510c6
/
.
/
tftp-hpa-5.0
/
lib
/
xstrdup.c
blob: 05e3054bff7cdddc29fbe69e5842ca080dd17597 [
file
] [
log
] [
blame
]
/*
* xstrdup.c
*
* Simple error-checking version of strdup()
*
*/
#include
"config.h"
char
*
xstrdup
(
const
char
*
s
)
{
char
*
p
=
strdup
(
s
);
if
(!
p
)
{
fprintf
(
stderr
,
"Out of memory!\n"
);
exit
(
128
);
}
return
p
;
}