repo.or.cz
/
tftp-hpa.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Update version for release
[tftp-hpa.git]
/
lib
/
xstrdup.c
blob
036b3b29fd78a0fe1fd28928474c3105b2575385
1
/*
2
* xstrdup.c
3
*
4
* Simple error-checking version of strdup()
5
*
6
*/
7
8
#include
"config.h"
9
10
char
*
xstrdup
(
const char
*
s
)
11
{
12
char
*
p
=
strdup
(
s
);
13
14
if
( !
p
) {
15
fprintf
(
stderr
,
"Out of memory!
\n
"
);
16
exit
(
128
);
17
}
18
19
return
p
;
20
}