projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0169b82
)
net: udp: remove redundant initialization in udp_send_skb
author
Menglong Dong
<dong.menglong@zte.com.cn>
Fri, 6 Nov 2020 06:42:40 +0000
(
01:42
-0500)
committer
Jakub Kicinski
<kuba@kernel.org>
Tue, 10 Nov 2020 00:42:34 +0000
(16:42 -0800)
The initialization for 'err' with 0 is redundant and can be removed,
as it is updated by ip_send_skb and not used before that.
Signed-off-by: Menglong Dong <dong.menglong@zte.com.cn>
Link:
https://lore.kernel.org/r/1604644960-48378-4-git-send-email-dong.menglong@zte.com.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/udp.c
patch
|
blob
|
history
diff --git
a/net/ipv4/udp.c
b/net/ipv4/udp.c
index 1e2e73accd11f0f590f51e791a1c8982b7f571be..0d5cd6905749247ade715a210af7e9702b669bc3 100644
(file)
--- a/
net/ipv4/udp.c
+++ b/
net/ipv4/udp.c
@@
-874,7
+874,7
@@
static int udp_send_skb(struct sk_buff *skb, struct flowi4 *fl4,
struct sock *sk = skb->sk;
struct inet_sock *inet = inet_sk(sk);
struct udphdr *uh;
- int err
= 0
;
+ int err;
int is_udplite = IS_UDPLITE(sk);
int offset = skb_transport_offset(skb);
int len = skb->len - offset;