diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2014-08-27 20:38:32 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2014-08-27 20:38:32 -0400 |
commit | 44c7e898076f407abed9342acf8005a318af2101 (patch) | |
tree | 812ef7aeb8d5d4fea7e5c819295e648d19eed0b1 | |
parent | 068a90a92337d8476a69ed0048723e7587f6209f (diff) | |
download | gpsd-44c7e898076f407abed9342acf8005a318af2101.tar.gz |
Clean up duplicarive code in gpsmon.
-rw-r--r-- | gpsmon.c | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -270,19 +270,8 @@ static void report_hook(const char *buf) /*@-compdef@*/ static void packet_vlog(/*@out@*/char *buf, size_t len, const char *fmt, va_list ap) { - char buf2[BUFSIZ]; - (void)vsnprintf(buf + strlen(buf), len, fmt, ap); - visibilize(buf2, sizeof(buf2), buf); - - report_lock(); - if (!curses_active) - (void)fputs(buf2, stdout); - else if (packetwin != NULL) - (void)waddstr(packetwin, buf2); - if (logfile != NULL) - (void)fputs(buf2, logfile); - report_unlock(); + report_hook(buf); } /*@+compdef@*/ |