diff options
author | marks <marks@FreeBSD.org> | 2004-12-01 23:14:10 +0000 |
---|---|---|
committer | marks <marks@FreeBSD.org> | 2004-12-01 23:14:10 +0000 |
commit | 93c2522130390c12e9ae98f3278c17f381a0db90 (patch) | |
tree | 4910f03edb15ce309eeb1b58facc922df30dd767 /sys/contrib/dev/acpica/exutils.c | |
parent | f84f460530aa9bde251160a8ebad4c1048e94251 (diff) | |
download | FreeBSD-src-93c2522130390c12e9ae98f3278c17f381a0db90.zip FreeBSD-src-93c2522130390c12e9ae98f3278c17f381a0db90.tar.gz |
Vendor import of Intel ACPI-CA 20041119
Diffstat (limited to 'sys/contrib/dev/acpica/exutils.c')
-rw-r--r-- | sys/contrib/dev/acpica/exutils.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/sys/contrib/dev/acpica/exutils.c b/sys/contrib/dev/acpica/exutils.c index 4f0c3bf..f9d41c7 100644 --- a/sys/contrib/dev/acpica/exutils.c +++ b/sys/contrib/dev/acpica/exutils.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: exutils - interpreter/scanner utilities - * $Revision: 111 $ + * $Revision: 112 $ * *****************************************************************************/ @@ -363,27 +363,27 @@ AcpiExDigitsNeeded ( { UINT32 NumDigits; ACPI_INTEGER CurrentValue; - ACPI_INTEGER Quotient; ACPI_FUNCTION_TRACE ("ExDigitsNeeded"); - /* - * ACPI_INTEGER is unsigned, so we don't worry about a '-' - */ - if ((CurrentValue = Value) == 0) + /* ACPI_INTEGER is unsigned, so we don't worry about a '-' prefix */ + + if (Value == 0) { return_VALUE (1); } + CurrentValue = Value; NumDigits = 0; + /* Count the digits in the requested base */ + while (CurrentValue) { - (void) AcpiUtShortDivide (&CurrentValue, Base, &Quotient, NULL); + (void) AcpiUtShortDivide (CurrentValue, Base, &CurrentValue, NULL); NumDigits++; - CurrentValue = Quotient; } return_VALUE (NumDigits); @@ -446,7 +446,6 @@ AcpiExUnsignedIntegerToString ( UINT32 Count; UINT32 DigitsNeeded; UINT32 Remainder; - ACPI_INTEGER Quotient; ACPI_FUNCTION_ENTRY (); @@ -457,9 +456,8 @@ AcpiExUnsignedIntegerToString ( for (Count = DigitsNeeded; Count > 0; Count--) { - (void) AcpiUtShortDivide (&Value, 10, &Quotient, &Remainder); + (void) AcpiUtShortDivide (Value, 10, &Value, &Remainder); OutString[Count-1] = (char) ('0' + Remainder);\ - Value = Quotient; } } |