projects
/
profile
/
ivi
/
ntp.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Initial commit to Gerrit
[profile/ivi/ntp.git]
/
sntp
/
libopts
/
compat
/
strdup.c
1
/*
2
* Platforms without strdup ?!?!?!
3
*/
4
5
static char *
6
strdup( char const *s )
7
{
8
char *cp;
9
10
if (s == NULL)
11
return NULL;
12
13
cp = (char *) AGALOC((unsigned) (strlen(s)+1), "strdup");
14
15
if (cp != NULL)
16
(void) strcpy(cp, s);
17
18
return cp;
19
}