]> Pileus Git - ~andy/linux/blobdiff - net/tipc/msg.h
Merge branch 'linux-2.6' into merge
[~andy/linux] / net / tipc / msg.h
index aec7ce7af8750392f86d11dc14afaf91884ea9c2..ce2659836374c8341d597bfc43d8dcbacf2b3dcf 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * net/tipc/msg.h: Include file for TIPC message header routines
  *
- * Copyright (c) 2000-2006, Ericsson AB
- * Copyright (c) 2005, Wind River Systems
+ * Copyright (c) 2000-2007, Ericsson AB
+ * Copyright (c) 2005-2007, Wind River Systems
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -71,8 +71,9 @@ static inline void msg_set_word(struct tipc_msg *m, u32 w, u32 val)
 static inline void msg_set_bits(struct tipc_msg *m, u32 w,
                                u32 pos, u32 mask, u32 val)
 {
-       u32 word = msg_word(m,w) & ~(mask << pos);
-       msg_set_word(m, w, (word |= (val << pos)));
+       val = (val & mask) << pos;
+       m->hdr[w] &= ~htonl(mask << pos);
+       m->hdr[w] |= htonl(val);
 }
 
 /*