Skip to content

Commit

Permalink
tipc: endianness annotations
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Al Viro authored and David S. Miller committed Apr 27, 2008
1 parent ec6b486 commit becf3da
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions net/tipc/msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ static inline void msg_set_bits(struct tipc_msg *m, u32 w,
u32 pos, u32 mask, u32 val)
{
val = (val & mask) << pos;
val = htonl(val);
mask = htonl(mask << pos);
m->hdr[w] &= ~mask;
m->hdr[w] |= val;
mask = mask << pos;
m->hdr[w] &= ~htonl(mask);
m->hdr[w] |= htonl(val);
}

/*
Expand Down

0 comments on commit becf3da

Please sign in to comment.