[PATCH 6/6] true: make true_aliases[] const

Ian Abbott abbotti at mev.co.uk
Wed May 17 06:24:26 PDT 2017


Although the elements of `true_aliases[]` are of type `const char *`,
the elements themselves are not const-qualified.  Make them `const`.

Signed-off-by: Ian Abbott <abbotti at mev.co.uk>
---
Note: This depends on my patch "commands: add ':' as alias for 'true'".
---
 commands/true.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands/true.c b/commands/true.c
index b850f5165..ad2be8e8e 100644
--- a/commands/true.c
+++ b/commands/true.c
@@ -26,7 +26,7 @@ static int do_true(int argc, char *argv[])
 	return 0;
 }
 
-static const char *true_aliases[] = { ":", NULL};
+static const char * const true_aliases[] = { ":", NULL};
 
 BAREBOX_CMD_START(true)
 	.aliases	= true_aliases,
-- 
2.11.0




More information about the barebox mailing list