]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/at45db/At45dbP.nc
turn on safe compilation for some modules
[tinyos-2.x.git] / tos / chips / at45db / At45dbP.nc
index 33c5ac5bd8e4811c3d2a42af324d107a4179de3f..1de75c80c01e68a94697060c06ebed2b3a72f3db 100644 (file)
@@ -39,7 +39,7 @@
  * @author David Gay
  */
 
-module At45dbP {
+module At45dbP @safe() {
   provides {
     interface Init;
     interface At45db;
@@ -399,8 +399,7 @@ implementation
                                        at45pageoffset_t n,
                                        uint16_t baseCrc) {
     /* This is a hack (store crc in reqBuf), but it saves 2 bytes of RAM */
-    reqBuf = TCAST(uint8_t * COUNT(baseCrc), baseCrc);
-    newRequest(R_READCRC, page, offset, reqBuf, n);
+    newRequest(R_READCRC, page, offset, TCAST(uint8_t * COUNT(n), baseCrc), n);
   }
 
   command void At45db.write(at45page_t page, at45pageoffset_t offset,