summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2009-01-13 19:44:21 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2009-01-13 19:44:21 +0000
commitf3743c6f5c1bcd7b83a1a8319773ca0ad9bbdb8e (patch)
tree6d6d34fab509688bbb28e140aa614bb75db834d1
parentc6503137fa3f3a39fd04a241d13125294fec8c5d (diff)
Trivial lvalue abuse fixes, no binary changes.
ok millert@ tedu@
-rw-r--r--sys/arch/i386/i386/mem.c4
-rw-r--r--sys/arch/i386/pci/auglx.c6
-rw-r--r--sys/dev/sdmmc/sdhc.c5
-rw-r--r--sys/isofs/cd9660/cd9660_vnops.c4
-rw-r--r--sys/nfs/nfs_subs.c5
-rw-r--r--sys/nfs/nfs_vnops.c23
6 files changed, 29 insertions, 18 deletions
diff --git a/sys/arch/i386/i386/mem.c b/sys/arch/i386/i386/mem.c
index 6c94688c0c0..1ea8bc413b7 100644
--- a/sys/arch/i386/i386/mem.c
+++ b/sys/arch/i386/i386/mem.c
@@ -1,5 +1,5 @@
/* $NetBSD: mem.c,v 1.31 1996/05/03 19:42:19 christos Exp $ */
-/* $OpenBSD: mem.c,v 1.35 2008/11/05 06:32:47 matthieu Exp $ */
+/* $OpenBSD: mem.c,v 1.36 2009/01/13 19:44:20 grange Exp $ */
/*
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1986, 1990, 1993
@@ -193,7 +193,7 @@ mmrw(dev_t dev, struct uio *uio, int flags)
default:
return (ENXIO);
}
- (char *)iov->iov_base += c;
+ iov->iov_base = (char *)iov->iov_base + c;
iov->iov_len -= c;
uio->uio_offset += c;
uio->uio_resid -= c;
diff --git a/sys/arch/i386/pci/auglx.c b/sys/arch/i386/pci/auglx.c
index c72587da196..6dbe9e0388b 100644
--- a/sys/arch/i386/pci/auglx.c
+++ b/sys/arch/i386/pci/auglx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auglx.c,v 1.3 2008/10/25 22:30:43 jakemsr Exp $ */
+/* $OpenBSD: auglx.c,v 1.4 2009/01/13 19:44:20 grange Exp $ */
/*
* Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org>
@@ -1144,7 +1144,7 @@ auglx_trigger_output(void *v, void *start, void *end, int blksize,
for (i = 0; i < nprd; i++) {
sc->bm0.sc_vprd[i].base = addr;
sc->bm0.sc_vprd[i].size = blksize | AUGLX_PRD_EOP;
- (char *)addr += blksize;
+ addr += blksize;
}
sc->bm0.sc_vprd[i].base = sc->bm0.sc_prd->dm_segs[0].ds_addr;
sc->bm0.sc_vprd[i].size = AUGLX_PRD_JMP;
@@ -1203,7 +1203,7 @@ auglx_trigger_input(void *v, void *start, void *end, int blksize,
for (i = 0; i < nprd; i++) {
sc->bm1.sc_vprd[i].base = addr;
sc->bm1.sc_vprd[i].size = blksize | AUGLX_PRD_EOP;
- (char *)addr += blksize;
+ addr += blksize;
}
sc->bm1.sc_vprd[i].base = sc->bm1.sc_prd->dm_segs[0].ds_addr;
sc->bm1.sc_vprd[i].size = AUGLX_PRD_JMP;
diff --git a/sys/dev/sdmmc/sdhc.c b/sys/dev/sdmmc/sdhc.c
index 23cfe6d6954..73c598c76ff 100644
--- a/sys/dev/sdmmc/sdhc.c
+++ b/sys/dev/sdmmc/sdhc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdhc.c,v 1.24 2007/10/01 15:34:48 krw Exp $ */
+/* $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -796,7 +796,8 @@ sdhc_write_data(struct sdhc_host *hp, u_char *datap, int datalen)
{
while (datalen > 3) {
DPRINTF(3,("%08x\n", *(u_int32_t *)datap));
- HWRITE4(hp, SDHC_DATA, *((u_int32_t *)datap)++);
+ HWRITE4(hp, SDHC_DATA, *((u_int32_t *)datap));
+ datap += 4;
datalen -= 4;
}
if (datalen > 0) {
diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c
index 4936f1e46ab..1406f566b51 100644
--- a/sys/isofs/cd9660/cd9660_vnops.c
+++ b/sys/isofs/cd9660/cd9660_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd9660_vnops.c,v 1.46 2008/06/09 23:38:37 millert Exp $ */
+/* $OpenBSD: cd9660_vnops.c,v 1.47 2009/01/13 19:44:20 grange Exp $ */
/* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */
/*-
@@ -755,7 +755,7 @@ cd9660_readlink(v)
return (error);
}
uio->uio_resid -= symlen;
- (char *)uio->uio_iov->iov_base += symlen;
+ uio->uio_iov->iov_base = (char *)uio->uio_iov->iov_base + symlen;
uio->uio_iov->iov_len -= symlen;
return (0);
}
diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c
index d4accc4852c..abe420b74c5 100644
--- a/sys/nfs/nfs_subs.c
+++ b/sys/nfs/nfs_subs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_subs.c,v 1.89 2008/12/24 02:48:36 thib Exp $ */
+/* $OpenBSD: nfs_subs.c,v 1.90 2009/01/13 19:44:20 grange Exp $ */
/* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */
/*
@@ -705,7 +705,8 @@ nfsm_mbuftouio(mrep, uiop, siz, dpos)
uiop->uio_iovcnt--;
uiop->uio_iov++;
} else {
- (char *)uiop->uio_iov->iov_base += uiosiz;
+ uiop->uio_iov->iov_base =
+ (char *)uiop->uio_iov->iov_base + uiosiz;
uiop->uio_iov->iov_len -= uiosiz;
}
siz -= uiosiz;
diff --git a/sys/nfs/nfs_vnops.c b/sys/nfs/nfs_vnops.c
index 87489a70b8e..b539c78367e 100644
--- a/sys/nfs/nfs_vnops.c
+++ b/sys/nfs/nfs_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_vnops.c,v 1.105 2008/12/24 02:43:52 thib Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.106 2009/01/13 19:44:20 grange Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
@@ -1095,7 +1095,9 @@ nfs_writerpc(vp, uiop, iomode, must_commit)
break;
} else if (rlen < len) {
backup = len - rlen;
- (char *)uiop->uio_iov->iov_base -= backup;
+ uiop->uio_iov->iov_base =
+ (char *)uiop->uio_iov->iov_base -
+ backup;
uiop->uio_iov->iov_len += backup;
uiop->uio_offset -= backup;
uiop->uio_resid += backup;
@@ -2123,7 +2125,9 @@ nfs_readdirrpc(struct vnode *vp,
if (blksiz == NFS_READDIRBLKSIZ)
blksiz = 0;
uiop->uio_resid -= NFS_DIRHDSIZ;
- (char *)uiop->uio_iov->iov_base += NFS_DIRHDSIZ;
+ uiop->uio_iov->iov_base =
+ (char *)uiop->uio_iov->iov_base +
+ NFS_DIRHDSIZ;
uiop->uio_iov->iov_len -= NFS_DIRHDSIZ;
nfsm_mtouio(uiop, len);
cp = uiop->uio_iov->iov_base;
@@ -2171,7 +2175,8 @@ nfs_readdirrpc(struct vnode *vp,
if (blksiz > 0) {
left = NFS_READDIRBLKSIZ - blksiz;
dp->d_reclen += left;
- (char *)uiop->uio_iov->iov_base += left;
+ uiop->uio_iov->iov_base = (char *)uiop->uio_iov->iov_base +
+ left;
uiop->uio_iov->iov_len -= left;
uiop->uio_resid -= left;
}
@@ -2275,7 +2280,8 @@ nfs_readdirplusrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred,
left = NFS_READDIRBLKSIZ - blksiz;
if ((tlen + NFS_DIRHDSIZ) > left) {
dp->d_reclen += left;
- (char *)uiop->uio_iov->iov_base += left;
+ uiop->uio_iov->iov_base =
+ (char *)uiop->uio_iov->iov_base + left;
uiop->uio_iov->iov_len -= left;
uiop->uio_resid -= left;
blksiz = 0;
@@ -2294,7 +2300,9 @@ nfs_readdirplusrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred,
if (blksiz == NFS_READDIRBLKSIZ)
blksiz = 0;
uiop->uio_resid -= NFS_DIRHDSIZ;
- (char *)uiop->uio_iov->iov_base += NFS_DIRHDSIZ;
+ uiop->uio_iov->iov_base =
+ (char *)uiop->uio_iov->iov_base +
+ NFS_DIRHDSIZ;
uiop->uio_iov->iov_len -= NFS_DIRHDSIZ;
cnp->cn_nameptr = uiop->uio_iov->iov_base;
cnp->cn_namelen = len;
@@ -2390,7 +2398,8 @@ nfs_readdirplusrpc(struct vnode *vp, struct uio *uiop, struct ucred *cred,
if (blksiz > 0) {
left = NFS_READDIRBLKSIZ - blksiz;
dp->d_reclen += left;
- (char *)uiop->uio_iov->iov_base += left;
+ uiop->uio_iov->iov_base = (char *)uiop->uio_iov->iov_base +
+ left;
uiop->uio_iov->iov_len -= left;
uiop->uio_resid -= left;
}