ACK: [PATCH 09/27] lib: fwts_text_list: fix up some const casting issues
ivanhu
ivan.hu at canonical.com
Thu Aug 16 09:14:15 UTC 2018
On 08/15/2018 09:11 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Fix some const char pointer casting warnings
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_text_list.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/lib/src/fwts_text_list.c b/src/lib/src/fwts_text_list.c
> index c223afbb..4255e573 100644
> --- a/src/lib/src/fwts_text_list.c
> +++ b/src/lib/src/fwts_text_list.c
> @@ -82,8 +82,8 @@ char *fwts_text_list_strstr(fwts_list *list, const char *needle)
> */
> fwts_list *fwts_list_from_text(const char *text)
> {
> - char *ptr;
> - fwts_list *list;
> + const char *ptr;
> + fwts_list *list;
>
> if (text == NULL)
> return NULL;
> @@ -91,10 +91,10 @@ fwts_list *fwts_list_from_text(const char *text)
> if ((list = fwts_list_new()) == NULL)
> return NULL;
>
> - ptr = (char*)text;
> + ptr = text;
>
> while (*ptr) {
> - char *start = ptr;
> + const char *start = ptr;
> char *str;
> int len;
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20180816/bb94ee91/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/fwts-devel/attachments/20180816/bb94ee91/attachment.sig>
More information about the fwts-devel
mailing list