summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2016-07-19 18:27:27 +0000
committerchristos <christos@NetBSD.org>2016-07-19 18:27:27 +0000
commit3f9b876ae699aeaebc1ea13399d99581ae933328 (patch)
tree00cb81cdf61f5609786b47885fdeb8e3102abafc /sys/dev
parenta49cf2004abcb8ed15322bacd5a40b449608aafe (diff)
make the check work with widths other than 4, Felix Deichmann
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/tc/tc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/tc/tc.c b/sys/dev/tc/tc.c
index ac9c7e6aa0f..76ccb525b95 100644
--- a/sys/dev/tc/tc.c
+++ b/sys/dev/tc/tc.c
@@ -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 @@ tc_check_romp(const struct tc_rommap *romp)
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 ||