[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] xsm/flask: mkflash.sh: Use const when generating initial_sid_to_string[]
commit 8b03f3ec04c7f62f21da7684b0d33993aa101d38 Author: Julien Grall <jgrall@xxxxxxxxxx> AuthorDate: Mon Dec 12 09:36:31 2022 +0000 Commit: Julien Grall <jgrall@xxxxxxxxxx> CommitDate: Tue Dec 20 09:28:06 2022 +0000 xsm/flask: mkflash.sh: Use const when generating initial_sid_to_string[] The array initial_sid_to_string is storing pointer to literal strings and is not meant to be modified. So change the type of the variable to "const char * const ...[]". Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx> Ack-by: Daniel P. Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx> --- xen/xsm/flask/policy/mkflask.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/xsm/flask/policy/mkflask.sh b/xen/xsm/flask/policy/mkflask.sh index 591ce832a1..6116897681 100755 --- a/xen/xsm/flask/policy/mkflask.sh +++ b/xen/xsm/flask/policy/mkflask.sh @@ -34,7 +34,7 @@ BEGIN { printf("/*\n * Security object class definitions\n */\n") > debugfile; printf(" S_(\"null\")\n") > debugfile; printf("/* This file is automatically generated. Do not edit. */\n") > debugfile2; - printf("static char *initial_sid_to_string[] =\n{\n") > debugfile2; + printf("static const char * const initial_sid_to_string[] =\n{\n") > debugfile2; printf(" \"null\",\n") > debugfile2; } /^[ \t]*#/ { -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |