[PATCH 02/26] lib: fwts_acpi_method: fix for loop index type

Keng-Yu Lin kengyu at canonical.com
Wed Oct 17 07:38:10 UTC 2012


On Mon, Oct 15, 2012 at 4:31 AM, Colin King <colin.king at canonical.com> wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Fix the type of a for loop to match that of the package Count type
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/lib/src/fwts_acpi_method.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/lib/src/fwts_acpi_method.c b/src/lib/src/fwts_acpi_method.c
> index 4a0e7ec..7974545 100644
> --- a/src/lib/src/fwts_acpi_method.c
> +++ b/src/lib/src/fwts_acpi_method.c
> @@ -182,7 +182,7 @@ char *fwts_method_exists(char *name)
>   */
>  static void fwts_method_dump_object_recursive(fwts_framework *fw, ACPI_OBJECT *obj, int depth, int index)
>  {
> -       int i;
> +       uint32_t i;
>         char index_buf[5];
>
>         if (index > -1)
> @@ -206,7 +206,7 @@ static void fwts_method_dump_object_recursive(fwts_framework *fw, ACPI_OBJECT *o
>         case ACPI_TYPE_PACKAGE:
>                 fwts_log_info_verbatum(fw, "%*s%sPackage has %d elements:",depth * 2, "",
>                         index_buf, obj->Package.Count);
> -               for (i=0; i < obj->Package.Count; i++) {
> +               for (i = 0; i < obj->Package.Count; i++) {
>                         ACPI_OBJECT *element = &obj->Package.Elements[i];
>                         fwts_method_dump_object_recursive(fw, element, depth + 1, i);
>                 }
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu at canonical.com>



More information about the fwts-devel mailing list