[PATCH] lib: fwts_acpi_method: use size_t instead of int

Alex Hung alex.hung at canonical.com
Wed Apr 11 02:22:09 UTC 2012


On 04/10/2012 10:35 PM, Colin King wrote:
> From: Colin Ian King<colin.king at canonical.com>
>
> Signed-off-by: Colin Ian King<colin.king at canonical.com>
> ---
>   src/lib/src/fwts_acpi_method.c |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/lib/src/fwts_acpi_method.c b/src/lib/src/fwts_acpi_method.c
> index c68f8e4..885c8c8 100644
> --- a/src/lib/src/fwts_acpi_method.c
> +++ b/src/lib/src/fwts_acpi_method.c
> @@ -164,12 +164,12 @@ fwts_list *fwts_method_get_names(void)
>    */
>   char *fwts_method_exists(char *name)
>   {
> -	int name_len = strlen(name);
> +	size_t name_len = strlen(name);
>   	fwts_list_link	*item;
>
>   	fwts_list_foreach(item, fwts_method_names) {
>   		char *method_name = fwts_list_data(char*, item);
> -		int len = strlen(method_name);
> +		size_t len = strlen(method_name);
>
>   		if (strncmp(name, method_name + len - name_len, name_len) == 0)
>   			return method_name;
Acked-by: Alex Hung <alex.hung at canonical.com>




More information about the fwts-devel mailing list