diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-09-16 23:51:31 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-09-16 23:51:31 +0000 |
commit | 1e509af17b32a2e2e1d60e35a4d32988c5fb02df (patch) | |
tree | 43b1ccd2574615c441cc3c7fb80fbe2ce2a2adcc /libc/string/arm | |
parent | 9635ca06608053d809de03a018be2478e3e4a505 (diff) |
make sure we treat count as size_t, not ssize_t ... fixes with help from khem
Diffstat (limited to 'libc/string/arm')
-rw-r--r-- | libc/string/arm/strncmp.S | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libc/string/arm/strncmp.S b/libc/string/arm/strncmp.S index 39344db75..46f5f5092 100644 --- a/libc/string/arm/strncmp.S +++ b/libc/string/arm/strncmp.S @@ -35,10 +35,11 @@ .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 |