projects
/
platform
/
upstream
/
bash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Bash-4.3 distribution sources and documentation
[platform/upstream/bash.git]
/
lib
/
readline
/
savestring.c
diff --git
a/lib/readline/savestring.c
b/lib/readline/savestring.c
index
63f467a
..
af98538
100644
(file)
--- a/
lib/readline/savestring.c
+++ b/
lib/readline/savestring.c
@@
-33,5
+33,9
@@
char *
savestring (s)
const char *s;
{
- return ((char *)strcpy ((char *)xmalloc (1 + strlen (s)), (s)));
+ char *ret;
+
+ ret = (char *)xmalloc (strlen (s) + 1);
+ strcpy (ret, s);
+ return ret;
}