save fuse prog command line in a comment
[protos/xbee-avr.git] / xbee_proto.c
index 05f0b56..409d9a9 100644 (file)
@@ -230,7 +230,7 @@ int xbee_proto_xmit(struct xbee_dev *dev, uint8_t channel_id, uint8_t type,
        hdr.type = type;
        hdr.id = channel_id;
 
-       if (channel_id < 0 || channel_id >= XBEE_MAX_CHANNEL ||
+       if (channel_id >= XBEE_MAX_CHANNEL ||
            dev->channel[channel_id].registered == 0) {
                dev->stats.tx_invalid_channel ++;
                return -1;
@@ -327,8 +327,9 @@ void xbee_proto_rx(struct xbee_dev *dev)
                /* not enough data */
                if (dev->frame_len < framelen)
                        continue;
-               if (xbee_proto_parse_frame(dev) < 0)
+               if (xbee_proto_parse_frame(dev) < 0) {
                        ;//XXX stats
+               }
                dev->frame_len = 0;
        }
 }