From 3756d7a8103057b66d4ac2826535562494640a57 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 27 Aug 2014 21:28:54 -0400 Subject: splint/cppcheck cleanuo after the gpsd_report change. All regression tests pass. --- gpsmon.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gpsmon.c') diff --git a/gpsmon.c b/gpsmon.c index c60b9870..c812063b 100644 --- a/gpsmon.c +++ b/gpsmon.c @@ -250,7 +250,7 @@ static void monitor_dump_send(/*@in@*/ const char *buf, size_t len) #endif /* defined(CONTROLSEND_ENABLE) || defined(RECONFIGURE_ENABLE) */ /*@-compdef@*/ -static void report_hook(const char *buf) +static void gpsmon_report(const char *buf) { char buf2[BUFSIZ]; @@ -271,7 +271,7 @@ static void report_hook(const char *buf) static void packet_vlog(/*@out@*/char *buf, size_t len, const char *fmt, va_list ap) { (void)vsnprintf(buf + strlen(buf), len, fmt, ap); - report_hook(buf); + gpsmon_report(buf); } /*@+compdef@*/ @@ -1054,10 +1054,9 @@ int main(int argc, char **argv) /*@ -observertrans @*/ (void)putenv("TZ=UTC"); // for ctime() /*@ +observertrans @*/ - gps_context_init(&context); // initialize the report mutex + gps_context_init(&context, "gsmon"); // initialize the report mutex context.serial_write = gpsmon_serial_write; - context.errout.label = "gpsmon"; - context.errout.report = report_hook; + context.errout.report = gpsmon_report; while ((option = getopt(argc, argv, "aD:LVhl:nt:?")) != -1) { switch (option) { case 'a': -- cgit v1.2.1