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>
This commit is contained in:
committed by
David S. Miller
parent
db71789c01
commit
36cbd3dcc1
@@ -2421,7 +2421,7 @@ static inline const char *rtn_scope(char *buf, size_t len, enum rt_scope_t s)
|
||||
}
|
||||
}
|
||||
|
||||
static const char *rtn_type_names[__RTN_MAX] = {
|
||||
static const char *const rtn_type_names[__RTN_MAX] = {
|
||||
[RTN_UNSPEC] = "UNSPEC",
|
||||
[RTN_UNICAST] = "UNICAST",
|
||||
[RTN_LOCAL] = "LOCAL",
|
||||
|
Reference in New Issue
Block a user