Skip to content

Commit

Permalink
tipc: remove duplicated code in tipc_msg_create
Browse files Browse the repository at this point in the history
Remove a duplicate code checking for header size in tipc_msg_create() as
it's already being done in tipc_msg_init().

Acked-by: Jon Maloy <jmaloy@redhat.com>
Signed-off-by: Hoang Huu Le <hoang.h.le@dektech.com.au>
Link: https://lore.kernel.org/r/20210127025123.6390-1-hoang.h.le@dektech.com.au
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Hoang Huu Le authored and Jakub Kicinski committed Jan 28, 2021
1 parent c7f3489 commit 2a9063b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions net/tipc/msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@ struct sk_buff *tipc_msg_create(uint user, uint type,
msg_set_origport(msg, oport);
msg_set_destport(msg, dport);
msg_set_errcode(msg, errcode);
if (hdr_sz > SHORT_H_SIZE) {
msg_set_orignode(msg, onode);
msg_set_destnode(msg, dnode);
}
return buf;
}

Expand Down

0 comments on commit 2a9063b

Please sign in to comment.