aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2002-12-01 15:47:49 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2002-12-01 15:47:49 +0000
commit3a4c5955ceadae3d1847b5ec341b2723a58dc59d (patch)
tree65d32580f2512482d847f6231afe2648c394b087 /sys
parent9e3a06e15026c50e3ec1ed64e84491e80f4f775c (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/geom/bde/g_bde_lock.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/geom/bde/g_bde_lock.c b/sys/geom/bde/g_bde_lock.c
index d415c3068399..e584c4d0385a 100644
--- a/sys/geom/bde/g_bde_lock.c
+++ b/sys/geom/bde/g_bde_lock.c
@@ -126,16 +126,17 @@ CTASSERT(NLOCK_FIELDS <= 16);
static void
g_bde_shuffle_lock(struct g_bde_softc *sc, int *buf)
{
- int i, j, k, l;
+ int j, k, l;
+ u_int u;
/* Assign the fields sequential positions */
- for(i = 0; i < NLOCK_FIELDS; i++)
- buf[i] = i;
+ for(u = 0; u < NLOCK_FIELDS; u++)
+ buf[u] = u;
/* Then mix it all up */
- for(i = 48; i < sizeof(sc->sha2); i++) {
- j = sc->sha2[i] % NLOCK_FIELDS;
- k = (sc->sha2[i] / NLOCK_FIELDS) % NLOCK_FIELDS;
+ for(u = 48; u < sizeof(sc->sha2); u++) {
+ j = sc->sha2[u] % NLOCK_FIELDS;
+ k = (sc->sha2[u] / NLOCK_FIELDS) % NLOCK_FIELDS;
l = buf[j];
buf[j] = buf[k];
buf[k] = l;