summaryrefslogtreecommitdiff
path: root/garmin.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2005-05-27 02:18:57 +0000
committerGary E. Miller <gem@rellim.com>2005-05-27 02:18:57 +0000
commit043b4d912d2eb3e14910cef0a9e9bcce5e3bb1a8 (patch)
tree3152ee34c4329c5f0dfb612788402580c48c0905 /garmin.c
parentb5200d78de19e3f0f486d76d6fb75403c0b920dc (diff)
downloadgpsd-043b4d912d2eb3e14910cef0a9e9bcce5e3bb1a8.tar.gz
last obvious splint changes, the remaining 6 are splint delusions
Diffstat (limited to 'garmin.c')
-rw-r--r--garmin.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/garmin.c b/garmin.c
index 1c22e7ed..ed564caf 100644
--- a/garmin.c
+++ b/garmin.c
@@ -34,6 +34,10 @@
* hangs in the fread loop instead of keeping state and returning.
* may or may not work on a little-endian machine
*/
+
+#define __USE_POSIX199309 1
+#include <time.h> // for nanosleep()
+
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
@@ -624,7 +628,7 @@ static int garmin_probe(struct gps_device_t *session)
if ( !session->GarminBuffer ) {
// get a packet buffer
session->GarminBuffer = calloc( sizeof(Packet_t), 1);
- if ( !session->GarminBuffer ) {
+ if ( NULL == session->GarminBuffer ) {
gpsd_report(0, "garmin_probe: out of memory!\n");
return 0;
}
@@ -831,7 +835,7 @@ static void garmin_init(struct gps_device_t *session)
//SendPacket(session, thePacket);
}
-static int garmin_get_packet(struct gps_device_t *session, unsigned int waiting UNUSED)
+static int garmin_get_packet(struct gps_device_t *session, /*@unused@*/ unsigned int waiting UNUSED )
{
return ( 0 == GetPacket( session ) ? 1 : 0);
}