summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_physio.c3
-rw-r--r--sys/kern/kern_subr.c13
-rw-r--r--sys/kern/subr_mchain.c6
-rw-r--r--sys/kern/sys_pipe.c2
-rw-r--r--sys/kern/uipc_cow.c2
5 files changed, 16 insertions, 10 deletions
diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c
index d312188..3525ca0 100644
--- a/sys/kern/kern_physio.c
+++ b/sys/kern/kern_physio.c
@@ -116,7 +116,8 @@ physio(dev_t dev, struct uio *uio, int ioflag)
if (iolen == 0 && !(bp->b_ioflags & BIO_ERROR))
goto doerror; /* EOF */
uio->uio_iov[i].iov_len -= iolen;
- uio->uio_iov[i].iov_base += iolen;
+ uio->uio_iov[i].iov_base =
+ (char *)uio->uio_iov[i].iov_base + iolen;
uio->uio_resid -= iolen;
uio->uio_offset += iolen;
if( bp->b_ioflags & BIO_ERROR) {
diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c
index ee38f2d..1a44b85 100644
--- a/sys/kern/kern_subr.c
+++ b/sys/kern/kern_subr.c
@@ -192,7 +192,7 @@ uiomove(cp, n, uio)
case UIO_NOCOPY:
break;
}
- iov->iov_base += cnt;
+ iov->iov_base = (char *)iov->iov_base + cnt;
iov->iov_len -= cnt;
uio->uio_resid -= cnt;
uio->uio_offset += cnt;
@@ -346,7 +346,7 @@ uiomoveco(cp, n, uio, obj, disposable)
case UIO_NOCOPY:
break;
}
- iov->iov_base += cnt;
+ iov->iov_base = (char *)iov->iov_base + cnt;
iov->iov_len -= cnt;
uio->uio_resid -= cnt;
uio->uio_offset += cnt;
@@ -415,7 +415,7 @@ uioread(n, uio, obj, nread)
if (error)
break;
- iov->iov_base += cnt;
+ iov->iov_base = (char *)iov->iov_base + cnt;
iov->iov_len -= cnt;
uio->uio_resid -= cnt;
uio->uio_offset += cnt;
@@ -438,6 +438,7 @@ ureadc(c, uio)
register struct uio *uio;
{
register struct iovec *iov;
+ register char *iov_base;
again:
if (uio->uio_iovcnt == 0 || uio->uio_resid == 0)
@@ -456,13 +457,15 @@ again:
break;
case UIO_SYSSPACE:
- *iov->iov_base = c;
+ iov_base = iov->iov_base;
+ *iov_base = c;
+ iov->iov_base = iov_base;
break;
case UIO_NOCOPY:
break;
}
- iov->iov_base++;
+ iov->iov_base = (char *)iov->iov_base + 1;
iov->iov_len--;
uio->uio_resid--;
uio->uio_offset++;
diff --git a/sys/kern/subr_mchain.c b/sys/kern/subr_mchain.c
index 82a5a49..cb15ff7 100644
--- a/sys/kern/subr_mchain.c
+++ b/sys/kern/subr_mchain.c
@@ -278,7 +278,8 @@ mb_put_uio(struct mbchain *mbp, struct uio *uiop, int size)
return error;
uiop->uio_offset += left;
uiop->uio_resid -= left;
- uiop->uio_iov->iov_base += left;
+ uiop->uio_iov->iov_base =
+ (char *)uiop->uio_iov->iov_base + left;
uiop->uio_iov->iov_len -= left;
size -= left;
}
@@ -528,7 +529,8 @@ md_get_uio(struct mdchain *mdp, struct uio *uiop, int size)
return error;
uiop->uio_offset += left;
uiop->uio_resid -= left;
- uiop->uio_iov->iov_base += left;
+ uiop->uio_iov->iov_base =
+ (char *)uiop->uio_iov->iov_base + left;
uiop->uio_iov->iov_len -= left;
size -= left;
}
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index 7acaf9d..235f862 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -691,7 +691,7 @@ pipe_build_write_buffer(wpipe, uio)
*/
uio->uio_iov->iov_len -= size;
- uio->uio_iov->iov_base += size;
+ uio->uio_iov->iov_base = (char *)uio->uio_iov->iov_base + size;
if (uio->uio_iov->iov_len == 0)
uio->uio_iov++;
uio->uio_resid -= size;
diff --git a/sys/kern/uipc_cow.c b/sys/kern/uipc_cow.c
index f570677..21701e0 100644
--- a/sys/kern/uipc_cow.c
+++ b/sys/kern/uipc_cow.c
@@ -166,7 +166,7 @@ socow_setup(struct mbuf *m0, struct uio *uio)
socow_stats.success++;
iov = uio->uio_iov;
- iov->iov_base += PAGE_SIZE;
+ iov->iov_base = (char *)iov->iov_base + PAGE_SIZE;
iov->iov_len -= PAGE_SIZE;
uio->uio_resid -= PAGE_SIZE;
uio->uio_offset += PAGE_SIZE;
OpenPOWER on IntegriCloud