summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/machdep.c
diff options
context:
space:
mode:
authorbz <bz@FreeBSD.org>2011-08-20 19:21:46 +0000
committerbz <bz@FreeBSD.org>2011-08-20 19:21:46 +0000
commit422bc41b314b204b624a6825c4a751104981bcaa (patch)
tree124c9d626082caddc163e685307d7573478ee5a9 /sys/amd64/amd64/machdep.c
parentff90e69a5ad57263f93dafbd3e5a5c47dc656a91 (diff)
downloadFreeBSD-src-422bc41b314b204b624a6825c4a751104981bcaa.zip
FreeBSD-src-422bc41b314b204b624a6825c4a751104981bcaa.tar.gz
In HEAD when doing no further checkes there is no reason use the
temporary variable and check with if as TUNABLE_*_FETCH do not alter values unless successfully found the tunable. Reported by: jhb, bde MFC after: 3 days X-MFC with: r224516 Approved by: re (kib)
Diffstat (limited to 'sys/amd64/amd64/machdep.c')
-rw-r--r--sys/amd64/amd64/machdep.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 00aa472..1e7b26c 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -1309,7 +1309,7 @@ getmemsize(caddr_t kmdp, u_int64_t first)
{
int i, physmap_idx, pa_indx, da_indx;
vm_paddr_t pa, physmap[PHYSMAP_SIZE];
- u_long physmem_tunable, memtest, tmpul;
+ u_long physmem_tunable, memtest;
pt_entry_t *pte;
struct bios_smap *smapbase, *smap, *smapend;
u_int32_t smapsize;
@@ -1376,8 +1376,7 @@ getmemsize(caddr_t kmdp, u_int64_t first)
* one could eventually do more with the code than just disable it.
*/
memtest = 1;
- if (TUNABLE_ULONG_FETCH("hw.memtest.tests", &tmpul))
- memtest = tmpul;
+ TUNABLE_ULONG_FETCH("hw.memtest.tests", &memtest);
/*
* Don't allow MAXMEM or hw.physmem to extend the amount of memory
OpenPOWER on IntegriCloud