summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2004-07-28 06:30:43 +0000
committerkan <kan@FreeBSD.org>2004-07-28 06:30:43 +0000
commit65947d062b07d3533a6a7599723889ca01c24789 (patch)
tree02ea8e4c6c1019ba130219d1dc256faf42f73cbf /sys/dev/syscons
parent4caefcbb3efd3493a8f32539679faf818ae0e1f1 (diff)
downloadFreeBSD-src-65947d062b07d3533a6a7599723889ca01c24789.zip
FreeBSD-src-65947d062b07d3533a6a7599723889ca01c24789.tar.gz
Avoid casts as lvalues.
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r--sys/dev/syscons/syscons.c4
-rw-r--r--sys/dev/syscons/syscons.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 669c256..5632963 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -872,7 +872,7 @@ scioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
frbp = scp->vtb.vtb_buffer + scp->ysize * lsize + ptr->x *
sizeof(u_int16_t);
/* Pointer to the last line of target buffer */
- (vm_offset_t)outp += ptr->ysize * csize;
+ outp = (char *)outp + ptr->ysize * csize;
/* Pointer to the last line of history buffer */
if (scp->history != NULL)
hstp = scp->history->vtb_buffer + sc_vtb_tail(scp->history) *
@@ -892,7 +892,7 @@ scioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td)
}
if (lnum < ptr->y)
continue;
- (vm_offset_t)outp -= csize;
+ outp = (char *)outp - csize;
retval = copyout((void *)frbp, outp, csize);
if (retval != 0)
break;
diff --git a/sys/dev/syscons/syscons.h b/sys/dev/syscons/syscons.h
index 29909f9..99bf8a4 100644
--- a/sys/dev/syscons/syscons.h
+++ b/sys/dev/syscons/syscons.h
@@ -92,7 +92,7 @@
#define SC_DRIVER_NAME "sc"
#define SC_VTY(dev) minor(dev)
#define SC_DEV(sc, vty) ((sc)->dev[(vty) - (sc)->first_vty])
-#define SC_STAT(dev) ((scr_stat *)(dev)->si_drv1)
+#define SC_STAT(dev) (*((scr_stat **)&(dev)->si_drv1))
/* printable chars */
#ifndef PRINTABLE
OpenPOWER on IntegriCloud