diff options
author | Chris Kuethe <chris.kuethe@gmail.com> | 2009-01-06 16:28:06 +0000 |
---|---|---|
committer | Chris Kuethe <chris.kuethe@gmail.com> | 2009-01-06 16:28:06 +0000 |
commit | bd7ac6701ae6c7a2f228af783d5da7fd0d488c8d (patch) | |
tree | 5e693bb9a7affb3071c11a4553a90b839504ead3 | |
parent | bfd84c7d21187d63ea9b659c3ecf2ecef5661c4a (diff) | |
download | gpsd-bd7ac6701ae6c7a2f228af783d5da7fd0d488c8d.tar.gz |
use "%z" to print size_t-sized things. also, whitespace
-rw-r--r-- | dgnss.c | 8 | ||||
-rw-r--r-- | libgpsd_core.c | 2 | ||||
-rw-r--r-- | sirfflash.c | 4 |
3 files changed, 7 insertions, 7 deletions
@@ -19,7 +19,7 @@ bool dgnss_url(char *name) /* is given string a valid URL for DGPS service? */ { - return + return strncmp(name,DGNSS_PROTO_NTRIP,strlen(DGNSS_PROTO_NTRIP))==0 || strncmp(name,DGNSS_PROTO_DGPSIP,strlen(DGNSS_PROTO_DGPSIP))==0; } @@ -31,11 +31,11 @@ int dgnss_open(struct gps_context_t *context, char *dgnss_service) { #ifdef NTRIP_ENABLE if (strncmp(dgnss_service,DGNSS_PROTO_NTRIP,strlen(DGNSS_PROTO_NTRIP))==0) - return ntrip_open(context, dgnss_service + strlen(DGNSS_PROTO_NTRIP)); + return ntrip_open(context, dgnss_service + strlen(DGNSS_PROTO_NTRIP)); #endif if (strncmp(dgnss_service,DGNSS_PROTO_DGPSIP,strlen(DGNSS_PROTO_DGPSIP))==0) - return dgpsip_open(context, dgnss_service + strlen(DGNSS_PROTO_DGPSIP)); + return dgpsip_open(context, dgnss_service + strlen(DGNSS_PROTO_DGPSIP)); #ifndef REQUIRE_DGNSS_PROTO return dgpsip_open(context, dgnss_service); @@ -94,7 +94,7 @@ void rtcm_relay(struct gps_device_t *session) gpsd_report(LOG_ERROR, "Write to RTCM sink failed\n"); else { session->rtcmtime = timestamp(); - gpsd_report(LOG_IO, "<= DGPS: %ld bytes of RTCM relayed.\n", session->context->rtcmbytes); + gpsd_report(LOG_IO, "<= DGPS: %zd bytes of RTCM relayed.\n", session->context->rtcmbytes); } } } diff --git a/libgpsd_core.c b/libgpsd_core.c index ccbf8028..dc818d5a 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -761,7 +761,7 @@ gps_mask_t gpsd_poll(struct gps_device_t *session) } /* update the scoreboard structure from the GPS */ - gpsd_report(LOG_RAW+2, "GPS sent %ld new characters\n", newlen); + gpsd_report(LOG_RAW+2, "GPS sent %zd new characters\n", newlen); if (newlen == -1) { /* read error */ session->gpsdata.online = 0; return 0; diff --git a/sirfflash.c b/sirfflash.c index 52b33eeb..da117f10 100644 --- a/sirfflash.c +++ b/sirfflash.c @@ -236,7 +236,7 @@ static int sirfProbe(int fd, char **version) want = 0; if (expect(fd,"\xa0\xa2\x00\x15\x06", 5, 1)) want = 21; - else if (expect(fd,"\xa0\xa2\x00\x51\x06", 5, 1)) + else if (expect(fd,"\xa0\xa2\x00\x51\x06", 5, 1)) want = 81; if (want) { @@ -247,7 +247,7 @@ static int sirfProbe(int fd, char **version) if (status == -1) return -1; } - gpsd_report(LOG_PROG, "%ld bytes = %s\n", len, gpsd_hexdump(buf, (size_t)len)); + gpsd_report(LOG_PROG, "%zd bytes = %s\n", len, gpsd_hexdump(buf, (size_t)len)); *version = strdup(buf); return 0; } else { |