diff options
author | bde <bde@FreeBSD.org> | 1999-08-24 00:04:45 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1999-08-24 00:04:45 +0000 |
commit | 9fe2430ab3679087009a43cac7c3af567c3c8099 (patch) | |
tree | 60834c43ac9512f3bc2886369392e97505cdf729 /sys/cam/scsi | |
parent | aff861d5446aa35f483feef4912c196a9926091d (diff) | |
download | FreeBSD-src-9fe2430ab3679087009a43cac7c3af567c3c8099.zip FreeBSD-src-9fe2430ab3679087009a43cac7c3af567c3c8099.tar.gz |
Cast pointers to uintptr_t instead of casting them to u_long. Don't
depend on gcc's feature of casting lvalues. Cosmetic.
Diffstat (limited to 'sys/cam/scsi')
-rw-r--r-- | sys/cam/scsi/scsi_ch.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/cam/scsi/scsi_ch.c b/sys/cam/scsi/scsi_ch.c index 146002f..5370900 100644 --- a/sys/cam/scsi/scsi_ch.c +++ b/sys/cam/scsi/scsi_ch.c @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: scsi_ch.c,v 1.13 1999/05/30 16:51:01 phk Exp $ + * $Id: scsi_ch.c,v 1.14 1999/05/31 11:24:00 phk Exp $ */ /* * Derived from the NetBSD SCSI changer driver. @@ -1136,7 +1136,7 @@ chgetelemstatus(struct cam_periph *periph, goto done; st_hdr = (struct read_element_status_header *)data; - pg_hdr = (struct read_element_status_page_header *)((u_long)st_hdr + + pg_hdr = (struct read_element_status_page_header *)((uintptr_t)st_hdr + sizeof(struct read_element_status_header)); desclen = scsi_2btoul(pg_hdr->edl); @@ -1187,7 +1187,7 @@ chgetelemstatus(struct cam_periph *periph, M_DEVBUF, M_WAITOK); bzero(user_data, avail * sizeof(struct changer_element_status)); - desc = (struct read_element_status_descriptor *)((u_long)data + + desc = (struct read_element_status_descriptor *)((uintptr_t)data + sizeof(struct read_element_status_header) + sizeof(struct read_element_status_page_header)); /* @@ -1198,7 +1198,8 @@ chgetelemstatus(struct cam_periph *periph, copy_element_status(softc, pg_hdr->flags, desc, ces); - (u_long)desc += desclen; + desc = (struct read_element_status_descriptor *) + ((uintptr_t)desc + desclen); } /* Copy element status structures out to userspace. */ |