diff options
author | jkim <jkim@FreeBSD.org> | 2011-04-04 17:44:26 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2011-04-04 17:44:26 +0000 |
commit | 8f7c029680ef6333e0c565669b17871d25a57203 (patch) | |
tree | aee6f60739e6c79fc5c4b186826b1fbfde59f56f /sys/dev | |
parent | b354a8c76b0f429e72e68e9afe23d289a7f316c7 (diff) | |
download | FreeBSD-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.c | 4 |
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; } |