diff options
author | Gary E. Miller <gem@rellim.com> | 2005-05-27 02:18:57 +0000 |
---|---|---|
committer | Gary E. Miller <gem@rellim.com> | 2005-05-27 02:18:57 +0000 |
commit | 043b4d912d2eb3e14910cef0a9e9bcce5e3bb1a8 (patch) | |
tree | 3152ee34c4329c5f0dfb612788402580c48c0905 /garmin.c | |
parent | b5200d78de19e3f0f486d76d6fb75403c0b920dc (diff) | |
download | gpsd-043b4d912d2eb3e14910cef0a9e9bcce5e3bb1a8.tar.gz |
last obvious splint changes, the remaining 6 are splint delusions
Diffstat (limited to 'garmin.c')
-rw-r--r-- | garmin.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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); } |