ACK: [PATCH 04/26] lib: fwts_framework: Make string length type a size_t rather than an int

Alex Hung alex.hung at canonical.com
Mon Oct 15 03:03:32 UTC 2012


On 10/15/2012 04:31 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> fwts_framework_strtrunc() string length parameter max needs to be a
> size_t rather than an int.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>   src/lib/src/fwts_framework.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
> index 927ee54..aa26d4b 100644
> --- a/src/lib/src/fwts_framework.c
> +++ b/src/lib/src/fwts_framework.c
> @@ -287,7 +287,7 @@ static void fwts_framework_show_tests(fwts_framework *fw, bool full)
>    *  fwts_framework_strtrunc()
>    *	truncate overlong string
>    */
> -static void fwts_framework_strtrunc(char *dest, const char *src, int max)
> +static void fwts_framework_strtrunc(char *dest, const char *src, size_t max)
>   {
>   	strncpy(dest, src, max);
>
>
Acked-by: Alex Hung <alex.hung at canonical.com>



More information about the fwts-devel mailing list