Source-Changes-HG archive

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

[src/trunk]: src/sys/kern In cn_get_magic() don't increment i in the for(; ; ) ...



details:   https://anonhg.NetBSD.org/src/rev/6be7ed5117c9
branches:  trunk
changeset: 518290:6be7ed5117c9
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Tue Nov 27 20:00:36 2001 +0000

description:
In cn_get_magic() don't increment i in the for(;;) loop, as it's already
set to point to the next value with CNS_MAGIC_NEXT().
Now it's obvious that the magic string on my U5 is +++++ and not +++ :)

diffstat:

 sys/kern/cnmagic.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 5480c890f58e -r 6be7ed5117c9 sys/kern/cnmagic.c
--- a/sys/kern/cnmagic.c        Tue Nov 27 18:05:30 2001 +0000
+++ b/sys/kern/cnmagic.c        Tue Nov 27 20:00:36 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cnmagic.c,v 1.3 2001/11/12 15:25:01 lukem Exp $        */
+/*     $NetBSD: cnmagic.c,v 1.4 2001/11/27 20:00:36 bouyer Exp $       */
 
 /*
  * Copyright (c) 2000 Eduardo Horvath
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cnmagic.c,v 1.3 2001/11/12 15:25:01 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cnmagic.c,v 1.4 2001/11/27 20:00:36 bouyer Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -125,7 +125,7 @@
 cn_get_magic(char *magic, int maglen) {
        unsigned int i, c;
        
-       for (i=0; i<CNS_LEN; i++) {
+       for (i=0; i<CNS_LEN;) {
                c = cn_magic[i];
                /* Translate a character */
                switch (CNS_MAGIC_VAL(c)) {



Home | Main Index | Thread Index | Old Index