protocol_splitter: fix type comparison

This commit is contained in:
Beat Küng
2017-10-04 14:13:14 +02:00
parent ec61ae0003
commit dd98ed565e
@@ -384,7 +384,7 @@ ssize_t Mavlink2Dev::write(struct file *filp, const char *buffer, size_t buflen)
int buf_free; int buf_free;
::ioctl(_fd, FIONSPACE, (unsigned long)&buf_free); ::ioctl(_fd, FIONSPACE, (unsigned long)&buf_free);
if (buf_free < buflen) { if (buf_free < (int)buflen) {
//let write fail, to let mavlink know the buffer would overflow //let write fail, to let mavlink know the buffer would overflow
//(this is because in the ioctl we pretend there is always enough space) //(this is because in the ioctl we pretend there is always enough space)
ret = -1; ret = -1;
@@ -617,4 +617,3 @@ out:
PX4_ERR("unrecognized command, try 'start <device>', 'stop', 'status'"); PX4_ERR("unrecognized command, try 'start <device>', 'stop', 'status'");
return 1; return 1;
} }