From 1e3cac574dd0f03d251066043f6bbcef64751958 Mon Sep 17 00:00:00 2001 From: Zbigniew Chyla Date: Sun, 22 Mar 2015 21:55:51 +0200 Subject: Use LOG_* symbol when setting/comparing log level Currently, debug level 0 is actually LOG_SHOUT. This change doesn't affect generated binary code. --- libgpsd_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libgpsd_core.c') diff --git a/libgpsd_core.c b/libgpsd_core.c index 65ff50d4..4a601134 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -53,7 +53,7 @@ static void basic_report(const char *buf) void errout_reset(struct gpsd_errout_t *errout) { - errout->debug = 0; + errout->debug = LOG_SHOUT; errout->report = basic_report; } @@ -176,7 +176,7 @@ void gpsd_vlog(const struct gpsd_errout_t *errout, visibilize(outbuf, outlen, buf, strlen(buf)); if (getpid() == getsid(getpid())) - syslog((errlevel == 0) ? LOG_ERR : LOG_NOTICE, "%s", outbuf); + syslog((errlevel == LOG_SHOUT) ? LOG_ERR : LOG_NOTICE, "%s", outbuf); else if (errout->report != NULL) errout->report(outbuf); else -- cgit v1.2.1