git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Support to multi-threading and pthread interface (POSIX.1-2008) (#23)
[lunaix-os.git]
/
lunaix-os
/
libs
/
klibc
/
string
/
trim.c
diff --git
a/lunaix-os/libs/klibc/string/trim.c
b/lunaix-os/libs/klibc/string/trim.c
index c15e159a94b9c6809c4d58926f990a03417a02d6..abd6508801907179c0f18eaaf7e4a8d6e5f73bcf 100644
(file)
--- a/
lunaix-os/libs/klibc/string/trim.c
+++ b/
lunaix-os/libs/klibc/string/trim.c
@@
-27,7
+27,7
@@
strltrim_safe(char* str)
l++;
}
- if (
!
l)
-
return str
;
- return str
cpy(str, str + l)
;
+ if (l)
+
strcpy(str, str + l)
;
+ return str;
}
\ No newline at end of file