Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/crypto/rijndael Declare for-loop control variable outsid...



details:   https://anonhg.NetBSD.org/src/rev/acb119e0af23
branches:  trunk
changeset: 764967:acb119e0af23
user:      jmmv <jmmv%NetBSD.org@localhost>
date:      Sat May 14 16:27:49 2011 +0000

description:
Declare for-loop control variable outside of the for statement to prevent
a warning and therefore fix the build.

diffstat:

 sys/crypto/rijndael/rijndael-api-fst.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r c8e08fa07419 -r acb119e0af23 sys/crypto/rijndael/rijndael-api-fst.c
--- a/sys/crypto/rijndael/rijndael-api-fst.c    Sat May 14 16:26:23 2011 +0000
+++ b/sys/crypto/rijndael/rijndael-api-fst.c    Sat May 14 16:27:49 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rijndael-api-fst.c,v 1.22 2011/05/14 01:59:19 christos Exp $   */
+/*     $NetBSD: rijndael-api-fst.c,v 1.23 2011/05/14 16:27:49 jmmv Exp $       */
 
 /**
  * rijndael-api-fst.c
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rijndael-api-fst.c,v 1.22 2011/05/14 01:59:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rijndael-api-fst.c,v 1.23 2011/05/14 16:27:49 jmmv Exp $");
 
 #include <sys/param.h>
 #ifdef _KERNEL
@@ -54,7 +54,9 @@
 
 static void xor16(uint8_t *d, const uint8_t *a, const uint8_t* b)
 {
-       for (size_t i = 0; i < 4; i++) {
+       size_t i;
+
+       for (i = 0; i < 4; i++) {
                *d++ = *a++ ^ *b++;
                *d++ = *a++ ^ *b++;
                *d++ = *a++ ^ *b++;



Home | Main Index | Thread Index | Old Index