aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2009-08-05 13:42:58 -0400
committerDavid S. Miller <davem@davemloft.net>2009-08-05 13:42:58 -0400
commit36cbd3dcc10384f813ec0814255f576c84f2bcd4 (patch)
treec3579edea972519d2f9ae99d7da9a5dd56e6f5c1 /net/netfilter
parentdb71789c01ae7b641f83c5aa64e7df25122f4b28 (diff)
net: mark read-only arrays as const
String literals are constant, and usually, we can also tag the array of pointers const too, moving it to the .rodata section. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/ipvs/ip_vs_proto.c3
-rw-r--r--net/netfilter/ipvs/ip_vs_proto_tcp.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_proto_udp.c2
3 files changed, 4 insertions, 3 deletions
diff --git a/net/netfilter/ipvs/ip_vs_proto.c b/net/netfilter/ipvs/ip_vs_proto.c
index 85c8892e1e8..3e767167454 100644
--- a/net/netfilter/ipvs/ip_vs_proto.c
+++ b/net/netfilter/ipvs/ip_vs_proto.c
@@ -127,7 +127,8 @@ ip_vs_create_timeout_table(int *table, int size)
127 * Set timeout value for state specified by name 127 * Set timeout value for state specified by name
128 */ 128 */
129int 129int
130ip_vs_set_state_timeout(int *table, int num, char **names, char *name, int to) 130ip_vs_set_state_timeout(int *table, int num, const char *const *names,
131 const char *name, int to)
131{ 132{
132 int i; 133 int i;
133 134
diff --git a/net/netfilter/ipvs/ip_vs_proto_tcp.c b/net/netfilter/ipvs/ip_vs_proto_tcp.c
index 2278e141489..91d28e07374 100644
--- a/net/netfilter/ipvs/ip_vs_proto_tcp.c
+++ b/net/netfilter/ipvs/ip_vs_proto_tcp.c
@@ -377,7 +377,7 @@ static int tcp_timeouts[IP_VS_TCP_S_LAST+1] = {
377 [IP_VS_TCP_S_LAST] = 2*HZ, 377 [IP_VS_TCP_S_LAST] = 2*HZ,
378}; 378};
379 379
380static char * tcp_state_name_table[IP_VS_TCP_S_LAST+1] = { 380static const char *const tcp_state_name_table[IP_VS_TCP_S_LAST+1] = {
381 [IP_VS_TCP_S_NONE] = "NONE", 381 [IP_VS_TCP_S_NONE] = "NONE",
382 [IP_VS_TCP_S_ESTABLISHED] = "ESTABLISHED", 382 [IP_VS_TCP_S_ESTABLISHED] = "ESTABLISHED",
383 [IP_VS_TCP_S_SYN_SENT] = "SYN_SENT", 383 [IP_VS_TCP_S_SYN_SENT] = "SYN_SENT",
diff --git a/net/netfilter/ipvs/ip_vs_proto_udp.c b/net/netfilter/ipvs/ip_vs_proto_udp.c
index 33a05d3684d..e7a6885e016 100644
--- a/net/netfilter/ipvs/ip_vs_proto_udp.c
+++ b/net/netfilter/ipvs/ip_vs_proto_udp.c
@@ -472,7 +472,7 @@ static int udp_timeouts[IP_VS_UDP_S_LAST+1] = {
472 [IP_VS_UDP_S_LAST] = 2*HZ, 472 [IP_VS_UDP_S_LAST] = 2*HZ,
473}; 473};
474 474
475static char * udp_state_name_table[IP_VS_UDP_S_LAST+1] = { 475static const char *const udp_state_name_table[IP_VS_UDP_S_LAST+1] = {
476 [IP_VS_UDP_S_NORMAL] = "UDP", 476 [IP_VS_UDP_S_NORMAL] = "UDP",
477 [IP_VS_UDP_S_LAST] = "BUG!", 477 [IP_VS_UDP_S_LAST] = "BUG!",
478}; 478};