gps fix sign-compare

This commit is contained in:
Daniel Agar
2017-09-07 10:27:36 +02:00
committed by Beat Küng
parent 9b5fe8c476
commit 4070abc132
+3 -2
View File
@@ -404,10 +404,11 @@ int GPS::pollOrRead(uint8_t *buf, size_t buf_length, int timeout)
* If more bytes are available, we'll go back to poll() again.
*/
#ifdef __PX4_NUTTX
int err = 0, bytesAvailable = 0;
int err = 0;
int bytesAvailable = 0;
err = ioctl(_serial_fd, FIONREAD, (unsigned long)&bytesAvailable);
if ((err != 0) || (bytesAvailable < buf_length)) {
if ((err != 0) || (bytesAvailable < (int)buf_length)) {
usleep(GPS_WAIT_BEFORE_READ * 1000);
}