]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - apps/Oscilloscope/OscilloscopeC.nc
The big interface switchover for Packet, Send, Receive, and AMSend.
[tinyos-2.x.git] / apps / Oscilloscope / OscilloscopeC.nc
index a198db8f8d8b4a5218be9d838aeedd8c791b1405..77cca21055c5c7adbd9a62104bf3e034744e47c1 100644 (file)
@@ -101,7 +101,9 @@ implementation
       {
        if (!sendbusy && sizeof local <= call AMSend.maxPayloadLength())
          {
-           memcpy(call AMSend.getPayload(&sendbuf), &local, sizeof local);
+           // Don't need to check for null because we've already checked length
+           // above
+           memcpy(call AMSend.getPayload(&sendbuf, sizeof(local)), &local, sizeof local);
            if (call AMSend.send(AM_BROADCAST_ADDR, &sendbuf, sizeof local) == SUCCESS)
              sendbusy = TRUE;
          }