diff options
author | Allan Stephens <allan.stephens@windriver.com> | 2008-06-04 20:37:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-04 20:37:34 -0400 |
commit | 757152175666681d54d370500e41a756cfedd4fc (patch) | |
tree | 39452e5ea148ec0743300a14a336c861a344fe0a /net/tipc/msg.h | |
parent | 9c396a7bfb4fe74e444be09069651280da520944 (diff) |
tipc: Optimize message initialization routine
This patch eliminates the rarely-used "error code" argument
when initializing a TIPC message header, since the default
value of zero is the desired result in most cases; the few
exceptional cases now set the error code explicitly.
Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r-- | net/tipc/msg.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h index ad487e8abcc2..3418ffa72c94 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h | |||
@@ -696,7 +696,7 @@ static inline u32 msg_tot_importance(struct tipc_msg *m) | |||
696 | 696 | ||
697 | 697 | ||
698 | static inline void msg_init(struct tipc_msg *m, u32 user, u32 type, | 698 | static inline void msg_init(struct tipc_msg *m, u32 user, u32 type, |
699 | u32 err, u32 hsize, u32 destnode) | 699 | u32 hsize, u32 destnode) |
700 | { | 700 | { |
701 | memset(m, 0, hsize); | 701 | memset(m, 0, hsize); |
702 | msg_set_version(m); | 702 | msg_set_version(m); |
@@ -705,7 +705,6 @@ static inline void msg_init(struct tipc_msg *m, u32 user, u32 type, | |||
705 | msg_set_size(m, hsize); | 705 | msg_set_size(m, hsize); |
706 | msg_set_prevnode(m, tipc_own_addr); | 706 | msg_set_prevnode(m, tipc_own_addr); |
707 | msg_set_type(m, type); | 707 | msg_set_type(m, type); |
708 | msg_set_errcode(m, err); | ||
709 | if (!msg_short(m)) { | 708 | if (!msg_short(m)) { |
710 | msg_set_orignode(m, tipc_own_addr); | 709 | msg_set_orignode(m, tipc_own_addr); |
711 | msg_set_destnode(m, destnode); | 710 | msg_set_destnode(m, destnode); |