[PATCH 04/26] lib: fwts_framework: Make string length type a size_t rather than an int
Keng-Yu Lin
kengyu at canonical.com
Wed Oct 17 07:38:40 UTC 2012
On Mon, Oct 15, 2012 at 4:31 AM, Colin King <colin.king at canonical.com> 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);
>
> --
> 1.7.10.4
>
Acked-by: Keng-Yu Lin <kengyu at canonical.com>
More information about the fwts-devel
mailing list