Skip to contentSkip to conversation

tipc endianness annotations

PATCH Applied Al Viro 2 participants 3 messages Apr 27, 2008

Subsystems (3)
lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 1/1 tipc endianness annotations

---
 net/tipc/msg.h |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
net/tipc/msg.h +3 -4
index 6ad070d..ad487e8 100644
@@ -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);
 }
 
 /*
Signature · 1 line
1.5.3.GIT