Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1742994

[PATCH 3/3] evaluate: make pointers in string arrays constant

From Harsha Sharma <harshasharmaiitr@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 3/3] evaluate: make pointers in string arrays constant
Date 2017-10-02 09:40 +0200
Message-ID <uw3uy-4tG-11@gated-at.bofh.it> (permalink)
References <uw3ux-4tG-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


static const char * array should probably be static const char * const
array
as per linux-kernel coding style

Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
---
 src/evaluate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/evaluate.c b/src/evaluate.c
index b783054..f48801a 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -33,7 +33,7 @@
 static struct output_ctx octx_debug_dummy;
 static int expr_evaluate(struct eval_ctx *ctx, struct expr **expr);
 
-static const char *byteorder_names[] = {
+static const char * const byteorder_names[] = {
 	[BYTEORDER_INVALID]		= "invalid",
 	[BYTEORDER_HOST_ENDIAN]		= "host endian",
 	[BYTEORDER_BIG_ENDIAN]		= "big endian",
@@ -3350,7 +3350,7 @@ static int cmd_evaluate_export(struct eval_ctx *ctx, struct cmd *cmd)
 			    ctx->debug_mask & DEBUG_NETLINK);
 }
 
-static const char *cmd_op_name[] = {
+static const char * const cmd_op_name[] = {
 	[CMD_INVALID]	= "invalid",
 	[CMD_ADD]	= "add",
 	[CMD_REPLACE]	= "replace",
-- 
1.9.1

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/3] evaluate: Follow linux-kernel coding style Harsha Sharma <harshasharmaiitr@gmail.com> - 2017-10-02 09:40 +0200
  [PATCH 3/3] evaluate: make pointers in string arrays constant  Harsha Sharma <harshasharmaiitr@gmail.com> - 2017-10-02 09:40 +0200
  [PATCH 2/3] evaluate: Place constant on right side in comparison Harsha Sharma <harshasharmaiitr@gmail.com> - 2017-10-02 09:40 +0200
  [PATCH 1/3] evaluate: Remove unnecessary spaces Harsha Sharma <harshasharmaiitr@gmail.com> - 2017-10-02 09:40 +0200

csiph-web