X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Facpi%2Fexecuter%2Fexutils.c;h=40c6abb8b49acd64fed2ff1dcd4d8578d6247900;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=bc425b2b4fd64fa93c84dafed8c4ba8d8599420e;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/drivers/acpi/executer/exutils.c b/drivers/acpi/executer/exutils.c index bc425b2b4..40c6abb8b 100644 --- a/drivers/acpi/executer/exutils.c +++ b/drivers/acpi/executer/exutils.c @@ -6,7 +6,7 @@ *****************************************************************************/ /* - * Copyright (C) 2000 - 2004, R. Byron Moore + * Copyright (C) 2000 - 2005, R. Byron Moore * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -280,25 +280,25 @@ acpi_ex_digits_needed ( { u32 num_digits; acpi_integer current_value; - acpi_integer quotient; ACPI_FUNCTION_TRACE ("ex_digits_needed"); - /* - * acpi_integer is unsigned, so we don't worry about a '-' - */ - if ((current_value = value) == 0) { + /* acpi_integer is unsigned, so we don't worry about a '-' prefix */ + + if (value == 0) { return_VALUE (1); } + current_value = value; num_digits = 0; + /* Count the digits in the requested base */ + while (current_value) { - (void) acpi_ut_short_divide (¤t_value, base, "ient, NULL); + (void) acpi_ut_short_divide (current_value, base, ¤t_value, NULL); num_digits++; - current_value = quotient; } return_VALUE (num_digits); @@ -361,7 +361,6 @@ acpi_ex_unsigned_integer_to_string ( u32 count; u32 digits_needed; u32 remainder; - acpi_integer quotient; ACPI_FUNCTION_ENTRY (); @@ -371,9 +370,8 @@ acpi_ex_unsigned_integer_to_string ( out_string[digits_needed] = 0; for (count = digits_needed; count > 0; count--) { - (void) acpi_ut_short_divide (&value, 10, "ient, &remainder); + (void) acpi_ut_short_divide (value, 10, &value, &remainder); out_string[count-1] = (char) ('0' + remainder);\ - value = quotient; } }