diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index b1ab79ca615a..d9e9f1019117 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -2016,12 +2016,12 @@ kern_sendfile(struct thread *td, struct sendfile_args *uap, */ pgoff = (vm_offset_t)(off & PAGE_MASK); xfsize = omin(PAGE_SIZE - pgoff, - obj->un_pager.vnp.vnp_size - off - + obj->un_pager.vnp.vnp_size - uap->offset - sbytes - loopbytes); if (uap->nbytes) rem = (uap->nbytes - sbytes - loopbytes); else - rem = obj->un_pager.vnp.vnp_size - off - + rem = obj->un_pager.vnp.vnp_size - uap->offset - sbytes - loopbytes; xfsize = omin(rem, xfsize); if (xfsize <= 0) {