diff options
author | jkim <jkim@FreeBSD.org> | 2010-08-09 18:10:32 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-08-09 18:10:32 +0000 |
commit | c07bc7f517e3ffad6cd1ca633f930ffa39d72b93 (patch) | |
tree | 761dc6e3aec45b08fbcf67e63964c4a8614326e7 /sys | |
parent | 3e33815f4dfd0c8b767d73a48d1a3c5795ffd227 (diff) | |
download | FreeBSD-src-c07bc7f517e3ffad6cd1ca633f930ffa39d72b93.zip FreeBSD-src-c07bc7f517e3ffad6cd1ca633f930ffa39d72b93.tar.gz |
Initialize a variable just before its use.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/x86bios/x86bios.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/compat/x86bios/x86bios.c b/sys/compat/x86bios/x86bios.c index 14f714e..50383c9 100644 --- a/sys/compat/x86bios/x86bios.c +++ b/sys/compat/x86bios/x86bios.c @@ -142,7 +142,6 @@ x86bios_free(void *addr, size_t size) paddr = vtophys(addr); if (paddr >= X86BIOS_MEM_SIZE || (paddr & PAGE_MASK) != 0) return; - nfree = atop(round_page(size)); mtx_lock(&x86bios_lock); for (i = 0; i < x86bios_vmc.npages; i++) if (x86bios_vmc.pmap[i].kva == (vm_offset_t)addr) @@ -151,6 +150,7 @@ x86bios_free(void *addr, size_t size) mtx_unlock(&x86bios_lock); return; } + nfree = atop(round_page(size)); bzero(x86bios_vmc.pmap + i, sizeof(*x86bios_vmc.pmap) * nfree); if (i + nfree == x86bios_vmc.npages) { x86bios_vmc.npages -= nfree; |