diff options
author | Mathias Krause <minipli@googlemail.com> | 2013-06-26 17:56:59 -0400 |
---|---|---|
committer | Steffen Klassert <steffen.klassert@secunet.com> | 2013-08-05 05:14:00 -0400 |
commit | 8603b9556e1727f0de7e43ef448c85ff93347f27 (patch) | |
tree | 4d81888d17ac4d34a1e620a756527dc23d72e054 /net/key | |
parent | e473fcb472574de978e47f980aeca510020a1286 (diff) |
af_key: constify lookup tables
The lookup tables for minimum sizes of extensions and for the pfkey
handler functions are read only, therefore can be const.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Diffstat (limited to 'net/key')
-rw-r--r-- | net/key/af_key.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/key/af_key.c b/net/key/af_key.c index 4089a210e852..d49f67681823 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c | |||
@@ -338,7 +338,7 @@ static int pfkey_error(const struct sadb_msg *orig, int err, struct sock *sk) | |||
338 | return 0; | 338 | return 0; |
339 | } | 339 | } |
340 | 340 | ||
341 | static u8 sadb_ext_min_len[] = { | 341 | static const u8 sadb_ext_min_len[] = { |
342 | [SADB_EXT_RESERVED] = (u8) 0, | 342 | [SADB_EXT_RESERVED] = (u8) 0, |
343 | [SADB_EXT_SA] = (u8) sizeof(struct sadb_sa), | 343 | [SADB_EXT_SA] = (u8) sizeof(struct sadb_sa), |
344 | [SADB_EXT_LIFETIME_CURRENT] = (u8) sizeof(struct sadb_lifetime), | 344 | [SADB_EXT_LIFETIME_CURRENT] = (u8) sizeof(struct sadb_lifetime), |
@@ -2737,7 +2737,7 @@ static int pfkey_spdflush(struct sock *sk, struct sk_buff *skb, const struct sad | |||
2737 | 2737 | ||
2738 | typedef int (*pfkey_handler)(struct sock *sk, struct sk_buff *skb, | 2738 | typedef int (*pfkey_handler)(struct sock *sk, struct sk_buff *skb, |
2739 | const struct sadb_msg *hdr, void * const *ext_hdrs); | 2739 | const struct sadb_msg *hdr, void * const *ext_hdrs); |
2740 | static pfkey_handler pfkey_funcs[SADB_MAX + 1] = { | 2740 | static const pfkey_handler pfkey_funcs[SADB_MAX + 1] = { |
2741 | [SADB_RESERVED] = pfkey_reserved, | 2741 | [SADB_RESERVED] = pfkey_reserved, |
2742 | [SADB_GETSPI] = pfkey_getspi, | 2742 | [SADB_GETSPI] = pfkey_getspi, |
2743 | [SADB_UPDATE] = pfkey_add, | 2743 | [SADB_UPDATE] = pfkey_add, |