aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/proto.c
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/dccp/proto.c
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/dccp/proto.c')
-rw-r--r--net/dccp/proto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 94ca8eaace7d..37b3b4293ef4 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -124,7 +124,7 @@ EXPORT_SYMBOL_GPL(dccp_done);
124 124
125const char *dccp_packet_name(const int type) 125const char *dccp_packet_name(const int type)
126{ 126{
127 static const char *dccp_packet_names[] = { 127 static const char *const dccp_packet_names[] = {
128 [DCCP_PKT_REQUEST] = "REQUEST", 128 [DCCP_PKT_REQUEST] = "REQUEST",
129 [DCCP_PKT_RESPONSE] = "RESPONSE", 129 [DCCP_PKT_RESPONSE] = "RESPONSE",
130 [DCCP_PKT_DATA] = "DATA", 130 [DCCP_PKT_DATA] = "DATA",
@@ -147,7 +147,7 @@ EXPORT_SYMBOL_GPL(dccp_packet_name);
147 147
148const char *dccp_state_name(const int state) 148const char *dccp_state_name(const int state)
149{ 149{
150 static char *dccp_state_names[] = { 150 static const char *const dccp_state_names[] = {
151 [DCCP_OPEN] = "OPEN", 151 [DCCP_OPEN] = "OPEN",
152 [DCCP_REQUESTING] = "REQUESTING", 152 [DCCP_REQUESTING] = "REQUESTING",
153 [DCCP_PARTOPEN] = "PARTOPEN", 153 [DCCP_PARTOPEN] = "PARTOPEN",