[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/2] tools/console: Use const whenever we point to literal strings


  • To: Julien Grall <julien@xxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Tue, 18 May 2021 17:01:57 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Julien Grall <jgrall@xxxxxxxxxx>, "Ian Jackson" <iwj@xxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Tue, 18 May 2021 16:02:04 +0000
  • Ironport-hdrordr: A9a23:7KZ50KAJy7qOBQjlHemu55DYdb4zR+YMi2TC1yhKKCC9Vvbo8P xG/c5rsSMc5wx8ZJhNo7+90ey7MBXhHP1OkOws1NWZLWrbUQKTRekIh+bfKn/bak/DH4ZmpN 5dmsNFaOEYY2IVsfrH
  • Ironport-sdr: NJDesJ2glXr5d2tWFnCKXphqs33pM33/jj1Rh6M5/Zt3Y5ob9VSDzBPkS6ZOTsmYcRWvaFMv6/ YBELsxBTDIQ2jqao6K6pUkYzzhDZtVvYfr5i9UJynTwtMlNEKQMlfMw8Tnex5m66Zyv2GeBsd2 ZGTqANlBx7SyCw7xIrUETe/DbdLQ6h73fDtjKx9GfZ2pXd40psAVP5MxMx5BPRx/TPke+BYaiW T9yYfSRLsE4dr6N0+K20xrlewKGW3dmzO1w0Li5DyIQYIjmz5cTPOpvCUkCiUAtDA37kENOhhk utA=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On Tue, May 18, 2021 at 03:01:34PM +0100, Julien Grall wrote:
> From: Julien Grall <jgrall@xxxxxxxxxx>
> 
> Literal strings are not meant to be modified. So we should use const
> char * rather than char * when we want to store a pointer to them.
> 
> Take the opportunity to remove the cast (char *) in console_init(). It
> is unnecessary and will remove the const.
> 
> Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx>
> Acked-by: Wei Liu <wl@xxxxxxx>
> 
> ---
>     Changes in v2:
>         - Remove the cast (char *) in console_init()

Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Thanks,

-- 
Anthony PERARD



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.