diff options
author | robert <robert@FreeBSD.org> | 2003-07-13 21:02:11 +0000 |
---|---|---|
committer | robert <robert@FreeBSD.org> | 2003-07-13 21:02:11 +0000 |
commit | 52004fa9625b6d8e083daedaa1dfae54ee1303f6 (patch) | |
tree | c8a8a75c6020219ae55f2cf6a8534828cd68a18e /sys/vm/vm_init.c | |
parent | 19480bfa11ff63554bd04cbf7b3a5efa162cad64 (diff) | |
download | FreeBSD-src-52004fa9625b6d8e083daedaa1dfae54ee1303f6.zip FreeBSD-src-52004fa9625b6d8e083daedaa1dfae54ee1303f6.tar.gz |
Avoid an unnecessary calculation: there is no need to subtract
`firstaddr' from `v' if we know that the former equals zero.
Diffstat (limited to 'sys/vm/vm_init.c')
-rw-r--r-- | sys/vm/vm_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_init.c b/sys/vm/vm_init.c index eaeae85..c7ab903 100644 --- a/sys/vm/vm_init.c +++ b/sys/vm/vm_init.c @@ -172,7 +172,7 @@ again: * 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"); |