sendfile: annotate unused value and ensure that npages is actually initialized

This commit is contained in:
Matt Macy 2018-05-19 05:10:51 +00:00
parent e1a92f058f
commit 7fd6841438

View File

@ -341,7 +341,7 @@ sendfile_swapin(vm_object_t obj, struct sf_io *sfio, off_t off, off_t len,
}
for (int i = 0; i < npages;) {
int j, a, count, rv;
int j, a, count, rv __unused;
/* Skip valid pages. */
if (vm_page_is_valid(pa[i], vmoff(i, off) & PAGE_MASK,
@ -688,6 +688,7 @@ retry_space:
if (space == 0) {
sfio = NULL;
nios = 0;
npages = 0;
goto prepend_header;
}
hdr_uio = NULL;