aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/feat.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/feat.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/feat.c')
-rw-r--r--net/dccp/feat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/dccp/feat.c b/net/dccp/feat.c
index b04160a2eea5..972b8dc918d6 100644
--- a/net/dccp/feat.c
+++ b/net/dccp/feat.c
@@ -213,7 +213,7 @@ static int dccp_feat_default_value(u8 feat_num)
213 */ 213 */
214static const char *dccp_feat_fname(const u8 feat) 214static const char *dccp_feat_fname(const u8 feat)
215{ 215{
216 static const char *feature_names[] = { 216 static const char *const feature_names[] = {
217 [DCCPF_RESERVED] = "Reserved", 217 [DCCPF_RESERVED] = "Reserved",
218 [DCCPF_CCID] = "CCID", 218 [DCCPF_CCID] = "CCID",
219 [DCCPF_SHORT_SEQNOS] = "Allow Short Seqnos", 219 [DCCPF_SHORT_SEQNOS] = "Allow Short Seqnos",
@@ -236,8 +236,9 @@ static const char *dccp_feat_fname(const u8 feat)
236 return feature_names[feat]; 236 return feature_names[feat];
237} 237}
238 238
239static const char *dccp_feat_sname[] = { "DEFAULT", "INITIALISING", "CHANGING", 239static const char *const dccp_feat_sname[] = {
240 "UNSTABLE", "STABLE" }; 240 "DEFAULT", "INITIALISING", "CHANGING", "UNSTABLE", "STABLE",
241};
241 242
242#ifdef CONFIG_IP_DCCP_DEBUG 243#ifdef CONFIG_IP_DCCP_DEBUG
243static const char *dccp_feat_oname(const u8 opt) 244static const char *dccp_feat_oname(const u8 opt)