Date: Mon, 4 Apr 2011 17:44:26 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r220336 - head/sys/dev/acpica Message-ID: <201104041744.p34HiQoY090866@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jkim Date: Mon Apr 4 17:44:26 2011 New Revision: 220336 URL: http://svn.freebsd.org/changeset/base/220336 Log: 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. Modified: head/sys/dev/acpica/acpi_timer.c Modified: head/sys/dev/acpica/acpi_timer.c ============================================================================== --- head/sys/dev/acpica/acpi_timer.c Mon Apr 4 17:39:30 2011 (r220335) +++ head/sys/dev/acpica/acpi_timer.c Mon Apr 4 17:44:26 2011 (r220336) @@ -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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104041744.p34HiQoY090866>