diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2012-05-18 05:00:21 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2012-05-18 05:00:21 -0400 |
commit | 0135ddfc993cd7056e68bca1e320631efce54bc2 (patch) | |
tree | 5cc33dc88e4007b2d653e1252d1c0003bda78245 /net_ntrip.c | |
parent | 7ee2bf88e99f0ffa027c5839e5ae85d55752ac1b (diff) | |
download | gpsd-0135ddfc993cd7056e68bca1e320631efce54bc2.tar.gz |
Yet more cppcheck fixups. All regression tests pass.
Diffstat (limited to 'net_ntrip.c')
-rw-r--r-- | net_ntrip.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net_ntrip.c b/net_ntrip.c index 0f4aca88..d766c6a1 100644 --- a/net_ntrip.c +++ b/net_ntrip.c @@ -101,7 +101,7 @@ static void ntrip_str_parse(char *str, size_t len, s = ntrip_field_iterate(NULL, s, eol); /* <carrier> */ if ((s = ntrip_field_iterate(NULL, s, eol))) - (void)sscanf(s, "%d", &hold->carrier); + hold->carrier = atoi(s); /* <nav-system> */ s = ntrip_field_iterate(NULL, s, eol); /* <network> */ @@ -111,14 +111,14 @@ static void ntrip_str_parse(char *str, size_t len, /* <latitude> */ hold->latitude = NAN; if ((s = ntrip_field_iterate(NULL, s, eol))) - (void)sscanf(s, "%lf", &hold->latitude); + hold->latitude = atof(s); /* <longitude> */ hold->longitude = NAN; if ((s = ntrip_field_iterate(NULL, s, eol))) - (void)sscanf(s, "%lf", &hold->longitude); + hold->longitude = atof(s); /* <nmea> */ if ((s = ntrip_field_iterate(NULL, s, eol))) { - (void)sscanf(s, "%d", &hold->nmea); + hold->nmea = atoi(s); } /* <solution> */ s = ntrip_field_iterate(NULL, s, eol); @@ -144,11 +144,11 @@ static void ntrip_str_parse(char *str, size_t len, } /* <fee> */ if ((s = ntrip_field_iterate(NULL, s, eol))) { - (void)sscanf(s, "%d", &hold->fee); + hold->fee = atoi(s); } /* <bitrate> */ if ((s = ntrip_field_iterate(NULL, s, eol))) { - (void)sscanf(s, "%d", &hold->bitrate); + hold->bitrate = atoi(s); } /* ...<misc> */ while ((s = ntrip_field_iterate(NULL, s, eol))); |