]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/cc1000/CC1000ActiveMessageP.nc
Remove bogus 'tab:4' and 'tab:2' markers.
[tinyos-2.x.git] / tos / chips / cc1000 / CC1000ActiveMessageP.nc
index 60a56d7a8e12807f497d552f83d17a851aa7a3de..08adb2039e3b65e310a10b47751cd4ff1bb67470 100644 (file)
@@ -1,6 +1,6 @@
 // $Id$
 
-/*                                                                     tab:4
+/*
  * "Copyright (c) 2004-2005 The Regents of the University  of California.  
  * All rights reserved.
  *
@@ -51,8 +51,8 @@ module CC1000ActiveMessageP {
 }
 implementation {
 
-  cc1000_header_t* getHeader(message_t* amsg) {
-    return (cc1000_header_t*)(amsg->data - sizeof(cc1000_header_t));
+  cc1000_header_t* ONE getHeader(message_t* ONE amsg) {
+    return TCAST(cc1000_header_t* ONE, (uint8_t*)amsg + offsetof(message_t, data) - sizeof(cc1000_header_t));
   }
 
   cc1000_footer_t *getFooter(message_t *amsg) {