]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/at45db/LogStorageP.nc
Add cast to get rid of warning in gcc 4.1.2
[tinyos-2.x.git] / tos / chips / at45db / LogStorageP.nc
index 4349e1eb870a5e1a900d394346be7cde2ba8f358..5938027a412af042a6d83efa23567caf91a35080 100644 (file)
@@ -267,6 +267,9 @@ implementation
   void sync() {
     metadata.flags = F_SYNC | F_LASTVALID;
     metadata.lastRecordOffset = s[client].woffset;
+    /* rend is now no longer the end of the page */
+    if (s[client].rpage == s[client].wpage)
+      s[client].rend = s[client].woffset;
     wmetadataStart();
   }
 
@@ -379,7 +382,7 @@ implementation
   }
 
   command error_t LogRead.seek[uint8_t id](storage_cookie_t offset) {
-    return newRequest(R_SEEK, id, (void *)(offset >> 16), offset);
+    return newRequest(R_SEEK, id, (void *)((uint16_t)(offset >> 16)), offset);
   }
 
   command storage_len_t LogRead.getSize[uint8_t id]() {