diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-04-27 01:42:14 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-27 17:26:49 -0400 |
commit | becf3da20eca82e06607b9813cc3b592b359bae5 (patch) | |
tree | 89693ca2c5739deb61dceed36f129c77dfed5b0f | |
parent | ec6b486fa9f6d20bfbaebba1db88bfe9d390ab1a (diff) |
tipc: endianness annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/tipc/msg.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h index 6ad070d87702..ad487e8abcc2 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h | |||
@@ -70,10 +70,9 @@ static inline void msg_set_bits(struct tipc_msg *m, u32 w, | |||
70 | u32 pos, u32 mask, u32 val) | 70 | u32 pos, u32 mask, u32 val) |
71 | { | 71 | { |
72 | val = (val & mask) << pos; | 72 | val = (val & mask) << pos; |
73 | val = htonl(val); | 73 | mask = mask << pos; |
74 | mask = htonl(mask << pos); | 74 | m->hdr[w] &= ~htonl(mask); |
75 | m->hdr[w] &= ~mask; | 75 | m->hdr[w] |= htonl(val); |
76 | m->hdr[w] |= val; | ||
77 | } | 76 | } |
78 | 77 | ||
79 | /* | 78 | /* |