summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2011-04-04 17:44:26 +0000
committerjkim <jkim@FreeBSD.org>2011-04-04 17:44:26 +0000
commit8f7c029680ef6333e0c565669b17871d25a57203 (patch)
treeaee6f60739e6c79fc5c4b186826b1fbfde59f56f /sys/dev
parentb354a8c76b0f429e72e68e9afe23d289a7f316c7 (diff)
downloadFreeBSD-src-8f7c029680ef6333e0c565669b17871d25a57203.zip
FreeBSD-src-8f7c029680ef6333e0c565669b17871d25a57203.tar.gz
Always check the current minimum value to make the test more predictable.
Use INT32_MAX instead of an arbitrary big number for the initial minimum.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpica/acpi_timer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/acpica/acpi_timer.c b/sys/dev/acpica/acpi_timer.c
index 3b02163..5be8fbc 100644
--- a/sys/dev/acpica/acpi_timer.c
+++ b/sys/dev/acpica/acpi_timer.c
@@ -310,7 +310,7 @@ acpi_timer_test()
int min, max, n, delta;
register_t s;
- min = 10000000;
+ min = INT32_MAX;
max = 0;
/* Test the timer with interrupts disabled to get accurate results. */
@@ -321,7 +321,7 @@ acpi_timer_test()
delta = acpi_TimerDelta(this, last);
if (delta > max)
max = delta;
- else if (delta < min)
+ if (delta < min)
min = delta;
last = this;
}
OpenPOWER on IntegriCloud