summaryrefslogtreecommitdiff
path: root/gpsmon.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-08-27 21:28:54 -0400
committerEric S. Raymond <esr@thyrsus.com>2014-08-27 21:28:54 -0400
commit3756d7a8103057b66d4ac2826535562494640a57 (patch)
treecb730426befccdfabd5732538412c243441f5306 /gpsmon.c
parent44c7e898076f407abed9342acf8005a318af2101 (diff)
downloadgpsd-3756d7a8103057b66d4ac2826535562494640a57.tar.gz
splint/cppcheck cleanuo after the gpsd_report change.
All regression tests pass.
Diffstat (limited to 'gpsmon.c')
-rw-r--r--gpsmon.c9
1 files changed, 4 insertions, 5 deletions
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':