summaryrefslogtreecommitdiff
path: root/sys/scsi/safte.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2005-08-17 00:07:09 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2005-08-17 00:07:09 +0000
commit0d2bc6888a3a998ae2188f95f98335eb08982957 (patch)
treea9e9801bf5c0178cf50eadeee8d8414cb96fb463 /sys/scsi/safte.c
parent52adc73ab9464525fd6f6a2c5efc972098881128 (diff)
dont increment the offset both in and out of the loop while reading the
config ok deraadt@ marco@
Diffstat (limited to 'sys/scsi/safte.c')
-rw-r--r--sys/scsi/safte.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/scsi/safte.c b/sys/scsi/safte.c
index dc665755da4..3b24cff7825 100644
--- a/sys/scsi/safte.c
+++ b/sys/scsi/safte.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: safte.c,v 1.10 2005/08/15 21:48:03 dlg Exp $ */
+/* $OpenBSD: safte.c,v 1.11 2005/08/17 00:07:08 dlg Exp $ */
/*
* Copyright (c) 2005 David Gwynne <dlg@openbsd.org>
@@ -306,7 +306,7 @@ safte_read_config(struct safte_softc *sc)
for (i = 0; i < config.npwrsup; i++) {
s->se_type = SAFTE_T_PWRSUP;
- s->se_field = (u_int8_t *)(sc->sc_encbuf + j++ + i);
+ s->se_field = (u_int8_t *)(sc->sc_encbuf + j + i);
s->se_sensor.type = SENSOR_INDICATOR;
snprintf(s->se_sensor.desc, sizeof(s->se_sensor.desc),
"psu%d", i);