Commit 2a9063b7 authored by Hoang Huu Le's avatar Hoang Huu Le Committed by Jakub Kicinski

tipc: remove duplicated code in tipc_msg_create

Remove a duplicate code checking for header size in tipc_msg_create() as
it's already being done in tipc_msg_init().
Acked-by: default avatarJon Maloy <jmaloy@redhat.com>
Signed-off-by: default avatarHoang Huu Le <hoang.h.le@dektech.com.au>
Link: https://lore.kernel.org/r/20210127025123.6390-1-hoang.h.le@dektech.com.auSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c7f3489b
...@@ -117,10 +117,6 @@ struct sk_buff *tipc_msg_create(uint user, uint type, ...@@ -117,10 +117,6 @@ struct sk_buff *tipc_msg_create(uint user, uint type,
msg_set_origport(msg, oport); msg_set_origport(msg, oport);
msg_set_destport(msg, dport); msg_set_destport(msg, dport);
msg_set_errcode(msg, errcode); msg_set_errcode(msg, errcode);
if (hdr_sz > SHORT_H_SIZE) {
msg_set_orignode(msg, onode);
msg_set_destnode(msg, dnode);
}
return buf; return buf;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment