projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c32d83c
)
net: ip_append_data() optim
author
Eric Dumazet
<
[email protected]
>
Tue, 24 Aug 2010 21:45:09 +0000
(14:45 -0700)
committer
David S. Miller
<
[email protected]
>
Tue, 24 Aug 2010 21:45:09 +0000
(14:45 -0700)
Compiler is not smart enough to avoid a conditional branch.
Signed-off-by: Eric Dumazet <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/ipv4/ip_output.c
patch
|
blob
|
history
diff --git
a/net/ipv4/ip_output.c
b/net/ipv4/ip_output.c
index 6d2753c7ffddf7ee7e7d468c0a9ddb6fbe02f675..e42762023c27bd405783648f9503f165522e67f3 100644
(file)
--- a/
net/ipv4/ip_output.c
+++ b/
net/ipv4/ip_output.c
@@
-837,10
+837,9
@@
int ip_append_data(struct sock *sk,
inet->cork.length = 0;
sk->sk_sndmsg_page = NULL;
sk->sk_sndmsg_off = 0;
- if ((exthdrlen = rt->dst.header_len) != 0) {
- length += exthdrlen;
- transhdrlen += exthdrlen;
- }
+ exthdrlen = rt->dst.header_len;
+ length += exthdrlen;
+ transhdrlen += exthdrlen;
} else {
rt = (struct rtable *)inet->cork.dst;
if (inet->cork.flags & IPCORK_OPT)