Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/tc make the check work with widths other than 4, Fel...



details:   https://anonhg.NetBSD.org/src/rev/5d4af2b0c959
branches:  trunk
changeset: 346572:5d4af2b0c959
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jul 19 18:27:27 2016 +0000

description:
make the check work with widths other than 4, Felix Deichmann

diffstat:

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

diffs (27 lines):

diff -r be3742f6ae15 -r 5d4af2b0c959 sys/dev/tc/tc.c
--- a/sys/dev/tc/tc.c   Tue Jul 19 17:04:25 2016 +0000
+++ b/sys/dev/tc/tc.c   Tue Jul 19 18:27:27 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tc.c,v 1.52 2016/07/19 16:58:05 christos Exp $ */
+/*     $NetBSD: tc.c,v 1.53 2016/07/19 18:27:27 christos Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.52 2016/07/19 16:58:05 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tc.c,v 1.53 2016/07/19 18:27:27 christos Exp $");
 
 #include "opt_tcverbose.h"
 
@@ -212,7 +212,7 @@
        if (romp->tcr_stride.v != 4)
                return 0;
 
-       for (size_t j = 0; j < 4; j++) {
+       for (size_t j = 0; j < romp->tcr_width.v; j++) {
                if (romp->tcr_test[j + 0 * romp->tcr_stride.v] != 0x55 ||
                    romp->tcr_test[j + 1 * romp->tcr_stride.v] != 0x00 ||
                    romp->tcr_test[j + 2 * romp->tcr_stride.v] != 0xaa ||



Home | Main Index | Thread Index | Old Index