aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/name_distr.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2008-06-04 20:37:34 -0400
committerDavid S. Miller <davem@davemloft.net>2008-06-04 20:37:34 -0400
commit757152175666681d54d370500e41a756cfedd4fc (patch)
tree39452e5ea148ec0743300a14a336c861a344fe0a /net/tipc/name_distr.c
parent9c396a7bfb4fe74e444be09069651280da520944 (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/name_distr.c')
-rw-r--r--net/tipc/name_distr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/tipc/name_distr.c b/net/tipc/name_distr.c
index aecba5cd87d6..10a69894e2fd 100644
--- a/net/tipc/name_distr.c
+++ b/net/tipc/name_distr.c
@@ -103,8 +103,7 @@ static struct sk_buff *named_prepare_buf(u32 type, u32 size, u32 dest)
103 103
104 if (buf != NULL) { 104 if (buf != NULL) {
105 msg = buf_msg(buf); 105 msg = buf_msg(buf);
106 msg_init(msg, NAME_DISTRIBUTOR, type, TIPC_OK, 106 msg_init(msg, NAME_DISTRIBUTOR, type, LONG_H_SIZE, dest);
107 LONG_H_SIZE, dest);
108 msg_set_size(msg, LONG_H_SIZE + size); 107 msg_set_size(msg, LONG_H_SIZE + size);
109 } 108 }
110 return buf; 109 return buf;