summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-12-01 15:47:49 +0000
committerphk <phk@FreeBSD.org>2002-12-01 15:47:49 +0000
commit2e45221c26951603034995af7a54f7cd16aad005 (patch)
tree65d32580f2512482d847f6231afe2648c394b087 /sys
parent076b3c495b33a8f240b14857e848b3460f6519a0 (diff)
downloadFreeBSD-src-2e45221c26951603034995af7a54f7cd16aad005.zip
FreeBSD-src-2e45221c26951603034995af7a54f7cd16aad005.tar.gz
Use unsigned for an index.
Sponsored by: DARPA & NAI Labs. Approved by: re (blanket).
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 d415c30..e584c4d 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;
OpenPOWER on IntegriCloud