sys_process.c fix set but not used warning

This commit is contained in:
Matt Macy 2018-05-19 03:48:35 +00:00
parent e339e43685
commit ac8b2d5cb1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=333828

View File

@ -321,7 +321,6 @@ proc_iop(struct thread *td, struct proc *p, vm_offset_t va, void *buf,
struct iovec iov;
struct uio uio;
ssize_t slen;
int error;
MPASS(len < SSIZE_MAX);
slen = (ssize_t)len;
@ -335,7 +334,7 @@ proc_iop(struct thread *td, struct proc *p, vm_offset_t va, void *buf,
uio.uio_segflg = UIO_SYSSPACE;
uio.uio_rw = rw;
uio.uio_td = td;
error = proc_rwmem(p, &uio);
proc_rwmem(p, &uio);
if (uio.uio_resid == slen)
return (-1);
return (slen - uio.uio_resid);