diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2009-07-09 21:49:05 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2009-07-09 21:49:05 +0000 |
commit | 92938e4782c82af08e4ffda40af291c0dc2f1d98 (patch) | |
tree | 57f79ad767bdae73aa3709d9f52195f829c9c59c /drivers.c | |
parent | d64918bc1678e2dc3e2264c7d850019949e04ca9 (diff) | |
download | gpsd-92938e4782c82af08e4ffda40af291c0dc2f1d98.tar.gz |
system call failure should be tested against -1, rather than "< 0"
Diffstat (limited to 'drivers.c')
-rw-r--r-- | drivers.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -663,7 +663,7 @@ static int tnt_packet_sniff(struct gps_device_t *session) { count = 0; (void)tnt_send(session->gpsdata.gps_fd, "@X?"); - if (ioctl(session->gpsdata.gps_fd, FIONREAD, &count) < 0) + if (ioctl(session->gpsdata.gps_fd, FIONREAD, &count) == -1) return BAD_PACKET; if (count == 0) { //int delay = 10000000000.0 / session->gpsdata.baudrate; |