summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorrobert <robert@FreeBSD.org>2003-07-13 21:02:11 +0000
committerrobert <robert@FreeBSD.org>2003-07-13 21:02:11 +0000
commit52004fa9625b6d8e083daedaa1dfae54ee1303f6 (patch)
treec8a8a75c6020219ae55f2cf6a8534828cd68a18e /sys
parent19480bfa11ff63554bd04cbf7b3a5efa162cad64 (diff)
downloadFreeBSD-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')
-rw-r--r--sys/vm/vm_init.c2
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");
OpenPOWER on IntegriCloud