Date: Fri, 14 Aug 2009 12:30:10 +0000 (UTC) From: Scott Long <scottl@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r196211 - head/usr.sbin/mfiutil Message-ID: <200908141230.n7ECUA9I034046@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: scottl Date: Fri Aug 14 12:30:10 2009 New Revision: 196211 URL: http://svn.freebsd.org/changeset/base/196211 Log: Fix is 32bit bug missed in testing. Approved by: re Modified: head/usr.sbin/mfiutil/mfi_drive.c Modified: head/usr.sbin/mfiutil/mfi_drive.c ============================================================================== --- head/usr.sbin/mfiutil/mfi_drive.c Fri Aug 14 11:22:09 2009 (r196210) +++ head/usr.sbin/mfiutil/mfi_drive.c Fri Aug 14 12:30:10 2009 (r196211) @@ -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, ui 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908141230.n7ECUA9I034046>