Patchwork acpi: cstates: use size_t instead of int

login
register
mail settings
Submitter Colin King
Date April 10, 2012, 2:25 p.m.
Message ID <1334067959-1753-1-git-send-email-colin.king@canonical.com>
Download mbox | patch
Permalink /patch/151583/
State Accepted
Headers show

Comments

Colin King - April 10, 2012, 2:25 p.m.
From: Colin Ian King <colin.king@canonical.com>

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/cstates/cstates.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Alex Hung - April 11, 2012, 2:06 a.m.
On 04/10/2012 10:25 PM, Colin King wrote:
> From: Colin Ian King<colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King<colin.king@canonical.com>
> ---
>   src/acpi/cstates/cstates.c |    2 +-
>   1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/acpi/cstates/cstates.c b/src/acpi/cstates/cstates.c
> index 6fb8664..40f9122 100644
> --- a/src/acpi/cstates/cstates.c
> +++ b/src/acpi/cstates/cstates.c
> @@ -112,7 +112,7 @@ static void get_cstates(char *path, fwts_cstates *state)
>   		if (entry&&  strlen(entry->d_name)>3) {
>   			int nr = 0;
>   			int count;
> -			int len;
> +			size_t len;
>
>   			snprintf(filename, sizeof(filename), "%s/%s/name",
>   				path, entry->d_name);
Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin - April 11, 2012, 5:08 a.m.
On Wed, Apr 11, 2012 at 10:06 AM, Alex Hung <alex.hung@canonical.com> wrote:
> On 04/10/2012 10:25 PM, Colin King wrote:
>
> From: Colin Ian King <colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  src/acpi/cstates/cstates.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/acpi/cstates/cstates.c b/src/acpi/cstates/cstates.c
> index 6fb8664..40f9122 100644
> --- a/src/acpi/cstates/cstates.c
> +++ b/src/acpi/cstates/cstates.c
> @@ -112,7 +112,7 @@ static void get_cstates(char *path, fwts_cstates *state)
>  		if (entry && strlen(entry->d_name)>3) {
>  			int nr = 0;
>  			int count;
> -			int len;
> +			size_t len;
>
>  			snprintf(filename, sizeof(filename), "%s/%s/name",
>  				path, entry->d_name);
>
> Acked-by: Alex Hung <alex.hung@canonical.com>
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>

Patch

diff --git a/src/acpi/cstates/cstates.c b/src/acpi/cstates/cstates.c
index 6fb8664..40f9122 100644
--- a/src/acpi/cstates/cstates.c
+++ b/src/acpi/cstates/cstates.c
@@ -112,7 +112,7 @@  static void get_cstates(char *path, fwts_cstates *state)
 		if (entry && strlen(entry->d_name)>3) {
 			int nr = 0;
 			int count;
-			int len;
+			size_t len;
 
 			snprintf(filename, sizeof(filename), "%s/%s/name",
 				path, entry->d_name);