Commit becf3da20eca82e06607b9813cc3b592b359bae5

Authored by Al Viro
Committed by David S. Miller
1 parent ec6b486fa9

tipc: endianness annotations

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 3 additions and 4 deletions Side-by-side Diff

... ... @@ -70,10 +70,9 @@
70 70 u32 pos, u32 mask, u32 val)
71 71 {
72 72 val = (val & mask) << pos;
73   - val = htonl(val);
74   - mask = htonl(mask << pos);
75   - m->hdr[w] &= ~mask;
76   - m->hdr[w] |= val;
  73 + mask = mask << pos;
  74 + m->hdr[w] &= ~htonl(mask);
  75 + m->hdr[w] |= htonl(val);
77 76 }
78 77  
79 78 /*