xen/char: console: Use const whenever we point to literal strings
authorJulien Grall <jgrall@amazon.com>
Wed, 26 May 2021 15:01:32 +0000 (16:01 +0100)
committerJulien Grall <jgrall@amazon.com>
Wed, 26 May 2021 15:01:32 +0000 (16:01 +0100)
commitb0a5b1735c704ec2055e52587a7c5b94370911c0
tree8cdf1530555eb4cf3bccad7cb6fadbd1fac9d20e
parent7793d19bac84cb84d919035faa9aa638f0a33370
xen/char: 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.

The array should also not be modified at all and is only used by
xenlog_update_val(). So take the opportunity to add an extra const and
move the definition in the function.

Signed-off-by: Julien Grall <jgrall@amazon.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com>
xen/drivers/char/console.c