Patchwork lib: fwts_battery: use size_t instead of int

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

Comments

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

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/lib/src/fwts_battery.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Alex Hung - April 11, 2012, 2:20 a.m.
On 04/10/2012 10:37 PM, Colin King wrote:
> From: Colin Ian King<colin.king@canonical.com>
>
> Signed-off-by: Colin Ian King<colin.king@canonical.com>
> ---
>   src/lib/src/fwts_battery.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/lib/src/fwts_battery.c b/src/lib/src/fwts_battery.c
> index 94084c0..008951d 100644
> --- a/src/lib/src/fwts_battery.c
> +++ b/src/lib/src/fwts_battery.c
> @@ -38,8 +38,8 @@ static int fwts_battery_get_capacity_sys_fs(fwts_framework *fw,
>   	struct dirent *entry;
>   	char *field_mAh;
>   	char *field_mWh;
> -	int  field_mAh_len;
> -	int  field_mWh_len;
> +	size_t field_mAh_len;
> +	size_t field_mWh_len;
>   	int  i = 0;
>
>   	switch (type) {
Acked-by: Alex Hung <alex.hung@canonical.com>
Keng-Yu Lin - April 11, 2012, 5:15 a.m.
On Wed, Apr 11, 2012 at 10:20 AM, Alex Hung <alex.hung@canonical.com> wrote:
> On 04/10/2012 10:37 PM, Colin King wrote:
>>
>> From: Colin Ian King<colin.king@canonical.com>
>>
>> Signed-off-by: Colin Ian King<colin.king@canonical.com>
>> ---
>>  src/lib/src/fwts_battery.c |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/lib/src/fwts_battery.c b/src/lib/src/fwts_battery.c
>> index 94084c0..008951d 100644
>> --- a/src/lib/src/fwts_battery.c
>> +++ b/src/lib/src/fwts_battery.c
>> @@ -38,8 +38,8 @@ static int
>> fwts_battery_get_capacity_sys_fs(fwts_framework *fw,
>>        struct dirent *entry;
>>        char *field_mAh;
>>        char *field_mWh;
>> -       int  field_mAh_len;
>> -       int  field_mWh_len;
>> +       size_t field_mAh_len;
>> +       size_t field_mWh_len;
>>        int  i = 0;
>>
>>        switch (type) {
>
> Acked-by: Alex Hung <alex.hung@canonical.com>
>
Acked-by: Keng-Yu Lin <kengyu@canonical.com>

Patch

diff --git a/src/lib/src/fwts_battery.c b/src/lib/src/fwts_battery.c
index 94084c0..008951d 100644
--- a/src/lib/src/fwts_battery.c
+++ b/src/lib/src/fwts_battery.c
@@ -38,8 +38,8 @@  static int fwts_battery_get_capacity_sys_fs(fwts_framework *fw,
 	struct dirent *entry;
 	char *field_mAh;
 	char *field_mWh;
-	int  field_mAh_len;
-	int  field_mWh_len;
+	size_t field_mAh_len;
+	size_t field_mWh_len;
 	int  i = 0;
 
 	switch (type) {