diff mbox

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

Message ID 1350246738-31699-3-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King Oct. 14, 2012, 8:31 p.m. UTC
From: Colin Ian King <colin.king@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@canonical.com>
---
 src/lib/src/fwts_acpi_method.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Alex Hung Oct. 15, 2012, 2:44 a.m. UTC | #1
On 10/15/2012 04:31 AM, Colin King wrote:
> From: Colin Ian King <colin.king@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@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);
>   		}
>

Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin Oct. 17, 2012, 7:38 a.m. UTC | #2
On Mon, Oct 15, 2012 at 4:31 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@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@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@canonical.com>
diff mbox

Patch

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);
 		}