]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/RadioCountToLeds/RadioCountToLedsC.nc
mark more modules as safe code
[tinyos-2.x.git] / apps / RadioCountToLeds / RadioCountToLedsC.nc
index d5f926f224cfdb7d15108f3b69d5ccbdb90755cb..be2b4886aae86bd04af9b0b6b6fea6f87b9419a9 100644 (file)
@@ -43,7 +43,7 @@
  * @date   June 6 2005
  */
 
-module RadioCountToLedsC {
+module RadioCountToLedsC @safe() {
   uses {
     interface Leds;
     interface Boot;
@@ -85,8 +85,8 @@ implementation {
       return;
     }
     else {
-      radio_count_msg_t* rcm = (radio_count_msg_t*)call Packet.getPayload(&packet, NULL);
-      if (call Packet.maxPayloadLength() < sizeof(radio_count_msg_t)) {
+      radio_count_msg_t* rcm = (radio_count_msg_t*)call Packet.getPayload(&packet, sizeof(radio_count_msg_t));
+      if (rcm == NULL) {
        return;
       }