ACK: [PATCH 01/27] lib: fwts_framework: ensure src pointer is const
Alex Hung
alex.hung at canonical.com
Wed Aug 15 17:54:09 UTC 2018
On 2018-08-15 06:11 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> We are reading src from a const static string, so make src
> pointer const char *.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_framework.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/lib/src/fwts_framework.c b/src/lib/src/fwts_framework.c
> index f6e7b72e..60b9bd66 100644
> --- a/src/lib/src/fwts_framework.c
> +++ b/src/lib/src/fwts_framework.c
> @@ -286,7 +286,8 @@ static void fwts_framework_show_tests_categories(void)
>
> for (i = 0; categories[i].title != NULL; i++) {
> if (categories[i].flag & test->flags) {
> - char *src = (char *)categories[i].title, *dst;
> + const char *src = (const char *)categories[i].title;
> + char *dst;
> size_t len = strlen(src) + 1;
> char buf[len];
>
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list