summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2009-01-10 00:15:55 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2009-01-10 00:15:55 +0000
commitab3bf88d2082362467f021c0c7a94b1b2859fa55 (patch)
tree7228aea8294aa58da278a450e0b1f93f48c4cc45 /sys
parent26aa67ec25df9c471b21f8340d8cf3df6bef0f19 (diff)
Don't try to cast an lvalue which is forbidden and something pcc, lint,
and newer versions of gcc all object to. ok miod@ krw@ beck@
Diffstat (limited to 'sys')
-rw-r--r--sys/scsi/ch.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c
index 03a0902287e..d0d724f3a15 100644
--- a/sys/scsi/ch.c
+++ b/sys/scsi/ch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ch.c,v 1.35 2008/06/22 16:32:05 krw Exp $ */
+/* $OpenBSD: ch.c,v 1.36 2009/01/10 00:15:54 jsg Exp $ */
/* $NetBSD: ch.c,v 1.26 1997/02/21 22:06:52 thorpej Exp $ */
/*
@@ -614,7 +614,8 @@ ch_usergetelemstatus(sc, cesr)
for (i = 0; i < avail; ++i) {
struct changer_element_status *ces = &(user_data[i]);
copy_element_status(pg_hdr->flags, desc, ces);
- (u_long)desc += desclen;
+ desc = (struct read_element_status_descriptor *)((u_long)desc +
+ desclen);
}
/* Copy array out to userspace. */