diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2010-08-24 17:45:09 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-08-24 17:45:09 -0400 |
commit | ec550d246e38e1b4ea8604b5c71ccb72e38f3290 (patch) | |
tree | 0874238f764a2fa45a84d1b24b98f4989db67b47 /net/ipv4/ip_output.c | |
parent | c32d83c0420950754cca01557bc5802793948d66 (diff) |
net: ip_append_data() optim
Compiler is not smart enough to avoid a conditional branch.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_output.c')
-rw-r--r-- | net/ipv4/ip_output.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 6d2753c7ffdd..e42762023c27 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -837,10 +837,9 @@ int ip_append_data(struct sock *sk, | |||
837 | inet->cork.length = 0; | 837 | inet->cork.length = 0; |
838 | sk->sk_sndmsg_page = NULL; | 838 | sk->sk_sndmsg_page = NULL; |
839 | sk->sk_sndmsg_off = 0; | 839 | sk->sk_sndmsg_off = 0; |
840 | if ((exthdrlen = rt->dst.header_len) != 0) { | 840 | exthdrlen = rt->dst.header_len; |
841 | length += exthdrlen; | 841 | length += exthdrlen; |
842 | transhdrlen += exthdrlen; | 842 | transhdrlen += exthdrlen; |
843 | } | ||
844 | } else { | 843 | } else { |
845 | rt = (struct rtable *)inet->cork.dst; | 844 | rt = (struct rtable *)inet->cork.dst; |
846 | if (inet->cork.flags & IPCORK_OPT) | 845 | if (inet->cork.flags & IPCORK_OPT) |