Module Name:    src
Committed By:   matt
Date:           Tue Aug 20 21:37:39 UTC 2013

Modified Files:
        src/common/lib/libc/arch/arm/string: strcpy_naive.S

Log Message:
write of final NUL in strlcpy doesn't need to be post-incremented


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/common/lib/libc/arch/arm/string/strcpy_naive.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/common/lib/libc/arch/arm/string/strcpy_naive.S
diff -u src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.3 src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.4
--- src/common/lib/libc/arch/arm/string/strcpy_naive.S:1.3	Sun Aug 11 05:02:35 2013
+++ src/common/lib/libc/arch/arm/string/strcpy_naive.S	Tue Aug 20 21:37:39 2013
@@ -28,7 +28,7 @@
  */
 #include <machine/asm.h>
 
-RCSID("$NetBSD: strcpy_naive.S,v 1.3 2013/08/11 05:02:35 matt Exp $")
+RCSID("$NetBSD: strcpy_naive.S,v 1.4 2013/08/20 21:37:39 matt Exp $")
 
 #ifdef _LIBC
 #ifdef STRLCPY
@@ -57,7 +57,7 @@ ENTRY(strlcpy)
 	bne	1b			/*   no, do next byte */
 	b	4f			/*   yes, end of string, so return */
 2:	mov	r3, #0			/* NUL */
-	strb	r3, [r0], #1		/* write to end of string */
+	strb	r3, [r0]		/* write to end of string */
 3:	ldrb	r3, [r1], #1		/* read a byte */
 	teq	r3, #0			/* was it a NUL? */
 	bne	3b			/*   no, get next byte */

Reply via email to