diff options
author | kan <kan@FreeBSD.org> | 2004-07-28 06:30:43 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2004-07-28 06:30:43 +0000 |
commit | 65947d062b07d3533a6a7599723889ca01c24789 (patch) | |
tree | 02ea8e4c6c1019ba130219d1dc256faf42f73cbf /sys | |
parent | 4caefcbb3efd3493a8f32539679faf818ae0e1f1 (diff) | |
download | FreeBSD-src-65947d062b07d3533a6a7599723889ca01c24789.zip FreeBSD-src-65947d062b07d3533a6a7599723889ca01c24789.tar.gz |
Avoid casts as lvalues.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/syscons/syscons.c | 4 | ||||
-rw-r--r-- | sys/dev/syscons/syscons.h | 2 | ||||
-rw-r--r-- | sys/fs/ntfs/ntfs_subr.c | 2 |
3 files changed, 4 insertions, 4 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 diff --git a/sys/fs/ntfs/ntfs_subr.c b/sys/fs/ntfs/ntfs_subr.c index ee1c71b..0b2b53e 100644 --- a/sys/fs/ntfs/ntfs_subr.c +++ b/sys/fs/ntfs/ntfs_subr.c @@ -1899,7 +1899,7 @@ ntfs_procfixups( return (EINVAL); } *cfxp = *fxp; - ((caddr_t) cfxp) += ntmp->ntm_bps; + cfxp = (u_int16_t *) ((caddr_t) cfxp + ntmp->ntm_bps); } return (0); } |