summaryrefslogtreecommitdiffstats
path: root/sys/i386
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/i386
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/i386')
-rw-r--r--sys/i386/i386/machdep.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 73e7551..e596b96 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -2132,7 +2132,7 @@ static void
getmemsize(int first)
{
int has_smap, off, physmap_idx, pa_indx, da_indx;
- u_long physmem_tunable, memtest, tmpul;
+ u_long physmem_tunable, memtest;
vm_paddr_t physmap[PHYSMAP_SIZE];
pt_entry_t *pte;
quad_t dcons_addr, dcons_size;
@@ -2344,8 +2344,7 @@ physmap_done:
* 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);
if (atop(physmap[physmap_idx + 1]) != Maxmem &&
(boothowto & RB_VERBOSE))
OpenPOWER on IntegriCloud