summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorscottl <scottl@FreeBSD.org>2009-08-14 12:30:10 +0000
committerscottl <scottl@FreeBSD.org>2009-08-14 12:30:10 +0000
commit4677d973d9b64776848cc45552ca132a52e768de (patch)
tree4a608e71226f082693ced3d3d3dda93d2a1ccb8b
parent3658df033e6752b1ee969cc6f0d1bfdce1d92898 (diff)
downloadFreeBSD-src-4677d973d9b64776848cc45552ca132a52e768de.zip
FreeBSD-src-4677d973d9b64776848cc45552ca132a52e768de.tar.gz
Fix is 32bit bug missed in testing.
Approved by: re
-rw-r--r--usr.sbin/mfiutil/mfi_drive.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/usr.sbin/mfiutil/mfi_drive.c b/usr.sbin/mfiutil/mfi_drive.c
index ec3ea26..1044228 100644
--- a/usr.sbin/mfiutil/mfi_drive.c
+++ b/usr.sbin/mfiutil/mfi_drive.c
@@ -75,8 +75,9 @@ int
mfi_lookup_drive(int fd, char *drive, uint16_t *device_id)
{
struct mfi_pd_list *list;
- long val;
uint8_t encl, slot;
+ long val;
+ u_int i;
char *cp;
/* Look for a raw device id first. */
@@ -117,15 +118,15 @@ mfi_lookup_drive(int fd, char *drive, uint16_t *device_id)
return (errno);
}
- for (val = 0; val < list->count; val++) {
- if (list->addr[val].scsi_dev_type != 0)
+ for (i = 0; i < list->count; i++) {
+ if (list->addr[i].scsi_dev_type != 0)
continue;
if (((encl == 0xff &&
- list->addr[val].encl_device_id == 0xffff) ||
- list->addr[val].encl_index == encl) &&
- list->addr[val].slot_number == slot) {
- *device_id = list->addr[val].device_id;
+ list->addr[i].encl_device_id == 0xffff) ||
+ list->addr[i].encl_index == encl) &&
+ list->addr[i].slot_number == slot) {
+ *device_id = list->addr[i].device_id;
free(list);
return (0);
}
OpenPOWER on IntegriCloud