projects
/
apps
/
pfixtools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb519b0
)
Fix m_strncpy() speed issue.
author
Florent Bruneau
<florent.bruneau@polytechnique.org>
Wed, 10 Sep 2008 22:32:37 +0000
(
00:32
+0200)
committer
Florent Bruneau
<florent.bruneau@polytechnique.org>
Wed, 10 Sep 2008 22:32:37 +0000
(
00:32
+0200)
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>
common/str.c
patch
|
blob
|
history
diff --git
a/common/str.c
b/common/str.c
index
99a5be5
..
c3cfbd4
100644
(file)
--- a/
common/str.c
+++ b/
common/str.c
@@
-132,7
+132,7
@@
ssize_t m_strcpy(char *dst, ssize_t n, const char *src)
*/
ssize_t m_strncpy(char *dst, ssize_t n, const char *src, ssize_t l)
{
- ssize_t len =
MIN(m_strlen(src)
, l);
+ ssize_t len =
m_strnlen(src
, l);
if (n > 0) {
ssize_t dlen = MIN(n - 1, len);