Avoid casts as lvalues.

This commit is contained in:
Alexander Kabaev 2004-07-28 06:30:43 +00:00
parent eec256de79
commit 1f74490224
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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

View File

@ -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);
}