repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Append a DIR_SEPARATOR to a path specified by the -B switch, if doing so would
[official-gcc.git]
/
libiberty
/
strdup.c
blob
1785b34f2745a1e43d61cf42bbec1862506dd2fb
1
char
*
2
strdup
(
s
)
3
char
*
s
;
4
{
5
char
*
result
= (
char
*)
malloc
(
strlen
(
s
) +
1
);
6
if
(
result
== (
char
*)
0
)
7
return
(
char
*)
0
;
8
strcpy
(
result
,
s
);
9
return
result
;
10
}