Avoid an unnecessary calculation: there is no need to subtract

`firstaddr' from `v' if we know that the former equals zero.
This commit is contained in:
Robert Drehmel 2003-07-13 21:02:11 +00:00
parent 533d8562e4
commit 857961d925
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117519

View File

@ -172,7 +172,7 @@ vm_ksubmap_init(struct kva_md_info *kmi)
* End of first pass, size has been calculated so allocate memory
*/
if (firstaddr == 0) {
size = (vm_size_t)((char *)v - firstaddr);
size = (vm_size_t)v;
firstaddr = kmem_alloc(kernel_map, round_page(size));
if (firstaddr == 0)
panic("startup: no room for tables");