From 422bc41b314b204b624a6825c4a751104981bcaa Mon Sep 17 00:00:00 2001 From: bz Date: Sat, 20 Aug 2011 19:21:46 +0000 Subject: 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) --- sys/i386/i386/machdep.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'sys/i386') 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)) -- cgit v1.1