tools/console: Use const whenever we point to literal strings
authorJulien Grall <jgrall@amazon.com>
Wed, 26 May 2021 15:01:51 +0000 (16:01 +0100)
committerJulien Grall <jgrall@amazon.com>
Wed, 26 May 2021 15:01:51 +0000 (16:01 +0100)
commit3beb2ee6be1d15f9f3c2bb89160803da21dc7e20
tree383ab69bbd8fc91e5df95a81363aae1407fe0bed
parentb0a5b1735c704ec2055e52587a7c5b94370911c0
tools/console: Use const whenever we point to literal strings

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@amazon.com>
Acked-by: Wei Liu <wl@xen.org>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
tools/console/client/main.c
tools/console/daemon/io.c