login
Header Space

 
 

[PATCH] tipc endianness annotations

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Miller <davem@...>
Cc: <linux-kernel@...>, <netdev@...>
Date: Sunday, April 27, 2008 - 1:40 am

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 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 6ad070d..ad487e8 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,
 				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);
 }
 
 /*
-- 
1.5.3.GIT

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] tipc endianness annotations, Al Viro, (Sun Apr 27, 1:40 am)
Re: [PATCH] tipc endianness annotations, David Miller, (Sun Apr 27, 1:42 am)
Re: [PATCH] tipc endianness annotations, David Miller, (Sun Apr 27, 1:42 am)
speck-geostationary