summaryrefslogtreecommitdiff
path: root/drivers.c
diff options
context:
space:
mode:
authorChris Kuethe <chris.kuethe@gmail.com>2009-07-09 21:49:05 +0000
committerChris Kuethe <chris.kuethe@gmail.com>2009-07-09 21:49:05 +0000
commit92938e4782c82af08e4ffda40af291c0dc2f1d98 (patch)
tree57f79ad767bdae73aa3709d9f52195f829c9c59c /drivers.c
parentd64918bc1678e2dc3e2264c7d850019949e04ca9 (diff)
downloadgpsd-92938e4782c82af08e4ffda40af291c0dc2f1d98.tar.gz
system call failure should be tested against -1, rather than "< 0"
Diffstat (limited to 'drivers.c')
-rw-r--r--drivers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers.c b/drivers.c
index 04532ece..c98bd8b9 100644
--- a/drivers.c
+++ b/drivers.c
@@ -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;