Patchwork [03/26] lib: fwts_dump: fix loop variable type to match table length type

login
register
mail settings
Submitter Colin King
Date Oct. 14, 2012, 8:31 p.m.
Message ID <1350246738-31699-4-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/191391/
State Accepted
Headers show

Comments

Colin King - Oct. 14, 2012, 8:31 p.m.
From: Colin Ian King <colin.king@canonical.com>

Ensure the loop variable is of the same type as that of the ACPI
table length.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/src/fwts_dump.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Alex Hung - Oct. 15, 2012, 2:58 a.m.
On 10/15/2012 04:31 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Ensure the loop variable is of the same type as that of the ACPI
> table length.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/lib/src/fwts_dump.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_dump.c b/src/lib/src/fwts_dump.c
> index f14e8f9..fb69376 100644
> --- a/src/lib/src/fwts_dump.c
> +++ b/src/lib/src/fwts_dump.c
> @@ -145,7 +145,7 @@ static int dump_lspci(fwts_framework *fw, const char *path, const char *filename
>   static int dump_acpi_table(fwts_acpi_table_info *table, FILE *fp)
>   {
>   	char buffer[128];
> -	int n;
> +	size_t n;
>
>   	fprintf(fp, "%s @ 0x%x\n", table->name, (uint32_t)table->addr);
>
>
Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin - Oct. 17, 2012, 7:38 a.m.
On Mon, Oct 15, 2012 at 4:31 AM, Colin King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Ensure the loop variable is of the same type as that of the ACPI
> table length.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/lib/src/fwts_dump.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_dump.c b/src/lib/src/fwts_dump.c
> index f14e8f9..fb69376 100644
> --- a/src/lib/src/fwts_dump.c
> +++ b/src/lib/src/fwts_dump.c
> @@ -145,7 +145,7 @@ static int dump_lspci(fwts_framework *fw, const char *path, const char *filename
>  static int dump_acpi_table(fwts_acpi_table_info *table, FILE *fp)
>  {
>         char buffer[128];
> -       int n;
> +       size_t n;
>
>         fprintf(fp, "%s @ 0x%x\n", table->name, (uint32_t)table->addr);
>
> --
> 1.7.10.4
>
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>

Patch

diff --git a/src/lib/src/fwts_dump.c b/src/lib/src/fwts_dump.c
index f14e8f9..fb69376 100644
--- a/src/lib/src/fwts_dump.c
+++ b/src/lib/src/fwts_dump.c
@@ -145,7 +145,7 @@  static int dump_lspci(fwts_framework *fw, const char *path, const char *filename
 static int dump_acpi_table(fwts_acpi_table_info *table, FILE *fp)
 {
 	char buffer[128];
-	int n;
+	size_t n;
 
 	fprintf(fp, "%s @ 0x%x\n", table->name, (uint32_t)table->addr);