summaryrefslogtreecommitdiffstats
path: root/net/dccp
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-07-13 12:22:24 +0100
committerDavid S. Miller <davem@davemloft.net>2017-07-13 09:24:02 -0700
commit5e349fc03cdd44c670aaf3affaa6f0426c5e553f (patch)
tree323cc5e277fee30f4a7946f306c02953c0de0d3a /net/dccp
parentbf98bd0be1ba509c5e6d77524ffac192f1edb2dd (diff)
downloadlinux-5e349fc03cdd44c670aaf3affaa6f0426c5e553f.tar.bz2
dccp: make const array error_code static
Don't populate array error_code on the stack but make it static. Makes the object code smaller by almost 250 bytes: Before: text data bss dec hex filename 10366 983 0 11349 2c55 net/dccp/input.o After: text data bss dec hex filename 10161 1039 0 11200 2bc0 net/dccp/input.o Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dccp')
-rw-r--r--net/dccp/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dccp/input.c b/net/dccp/input.c
index 4a05d7876850..fa6be9750bb4 100644
--- a/net/dccp/input.c
+++ b/net/dccp/input.c
@@ -126,7 +126,7 @@ static int dccp_rcv_closereq(struct sock *sk, struct sk_buff *skb)
static u16 dccp_reset_code_convert(const u8 code)
{
- const u16 error_code[] = {
+ static const u16 error_code[] = {
[DCCP_RESET_CODE_CLOSED] = 0, /* normal termination */
[DCCP_RESET_CODE_UNSPECIFIED] = 0, /* nothing known */
[DCCP_RESET_CODE_ABORTED] = ECONNRESET,