From a6f20e590e9b485822befc3542caa1f21cdff676 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 9 Oct 2011 09:00:40 -0400 Subject: const and splint cleanup. --- gpsdecode.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'gpsdecode.c') diff --git a/gpsdecode.c b/gpsdecode.c index 7027cc6c..0c03a113 100644 --- a/gpsdecode.c +++ b/gpsdecode.c @@ -448,10 +448,11 @@ static void encode(FILE *fpin, FILE *fpout) { char inbuf[BUFSIZ]; struct policy_t policy; - struct gps_data_t gpsdata; + struct gps_device_t session; int lineno = 0; memset(&policy, '\0', sizeof(policy)); + memset(&session, '\0', sizeof(session)); policy.json = true; while (fgets(inbuf, (int)sizeof(inbuf), fpin) != NULL) { @@ -460,15 +461,15 @@ static void encode(FILE *fpin, FILE *fpout) ++lineno; if (inbuf[0] == '#') continue; - status = libgps_json_unpack(inbuf, &gpsdata, NULL); + status = libgps_json_unpack(inbuf, &session.gpsdata, NULL); if (status != 0) { (void)fprintf(stderr, "gpsdecode: dying with status %d (%s) on line %d\n", status, json_error_string(status), lineno); exit(1); } - json_data_report(gpsdata.set, - &gpsdata, &policy, + json_data_report(session.gpsdata.set, + &session, &policy, inbuf, sizeof(inbuf)); (void)fputs(inbuf, fpout); } -- cgit v1.2.1