OSDN Git Service

make sure we treat count as size_t, not ssize_t ... fixes with help from khem
authorMike Frysinger <vapier@gentoo.org>
Fri, 16 Sep 2005 23:51:31 +0000 (23:51 -0000)
committerMike Frysinger <vapier@gentoo.org>
Fri, 16 Sep 2005 23:51:31 +0000 (23:51 -0000)
libc/string/arm/strncmp.S

index 39344db..46f5f50 100644 (file)
 .align 4
 
 strncmp:
-       /* if ((len - 1) < 0) return 0 */
+       /* if (len == 0) return 0 */
+       cmp     r2, #0
+       moveq   r0, #0
+       moveq   pc, lr
        subs    r2, r2, #1
-       movmi   r0, #0
-       movmi   pc, lr
 
        /* ip == last src address to compare */
        add     ip, r0, r2