diff options
Diffstat (limited to 'sys/kern/kern_subr.c')
-rw-r--r-- | sys/kern/kern_subr.c | 13 |
1 files changed, 8 insertions, 5 deletions
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++; |