diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-05-26 19:19:29 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-05-26 19:19:29 +0000 |
commit | 39f94b2989d495fa2db1438f86c3d6a1bd6c5486 (patch) | |
tree | 9a5c475776cda42331c81d2be1e2b6f6fa5bcd55 /libgpsd_core.c | |
parent | 75cd79019c3f262746f8d7ca102e33495e0a6af5 (diff) | |
download | gpsd-39f94b2989d495fa2db1438f86c3d6a1bd6c5486.tar.gz |
More splint cleanup. Down to 1689 warnings.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r-- | libgpsd_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c index b2f3d281..85083672 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -37,7 +37,7 @@ int gpsd_open_dgps(char *dgpsserver) dsock = netlib_connectsock(dgpsserver, dgpsport, "tcp"); if (dsock >= 0) { gethostname(hn, sizeof(hn)); - sprintf(buf, "HELO %s gpsd %s\r\nR\r\n", hn, VERSION); + snprintf(buf, sizeof(buf), "HELO %s gpsd %s\r\nR\r\n", hn, VERSION); write(dsock, buf, strlen(buf)); } return dsock; @@ -276,7 +276,7 @@ static int handle_packet(struct gps_device_t *session) session->sentdgps++; if (session->dsock > -1) { char buf[BUFSIZ]; - sprintf(buf, "R %0.8f %0.8f %0.2f\r\n", + snprintf(buf, sizeof(buf), "R %0.8f %0.8f %0.2f\r\n", session->gpsdata.fix.latitude, session->gpsdata.fix.longitude, session->gpsdata.fix.altitude); @@ -377,7 +377,7 @@ void gpsd_zero_satellites(struct gps_data_t *out) out->satellites = 0; } -void gpsd_raw_hook(struct gps_device_t *session, char *sentence, int len, int level) +void gpsd_raw_hook(struct gps_device_t *session, char *sentence, size_t len, int level) { if (session->gpsdata.raw_hook) { session->gpsdata.raw_hook(&session->gpsdata, sentence, len, level); |