From: Florent Bruneau Date: Wed, 10 Sep 2008 22:32:37 +0000 (+0200) Subject: Fix m_strncpy() speed issue. X-Git-Url: http://git.madism.org/?a=commitdiff_plain;h=20d6aecde9782542b82726864fcb01f01ff38dff;p=apps%2Fpfixtools.git Fix m_strncpy() speed issue. Signed-off-by: Florent Bruneau --- diff --git a/common/str.c b/common/str.c index 99a5be5..c3cfbd4 100644 --- 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);