diff options
Diffstat (limited to 'net/tipc')
-rw-r--r-- | net/tipc/msg.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h index 88a2ee03bb2a..6ad070d87702 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h | |||
@@ -70,8 +70,10 @@ 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 | m->hdr[w] &= ~htonl(mask << pos); | 73 | val = htonl(val); |
74 | m->hdr[w] |= htonl(val); | 74 | mask = htonl(mask << pos); |
75 | m->hdr[w] &= ~mask; | ||
76 | m->hdr[w] |= val; | ||
75 | } | 77 | } |
76 | 78 | ||
77 | /* | 79 | /* |