diff options
author | Zbigniew Chyla <zbigniew.chyla@nokia.com> | 2015-03-22 21:55:51 +0200 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-03-22 16:37:17 -0400 |
commit | 1e3cac574dd0f03d251066043f6bbcef64751958 (patch) | |
tree | dae69f9ea75d03336f0838c15fc7d380469d9f7f | |
parent | 5b0bba4227dedb1c0f3004e9d6b775365390be11 (diff) | |
download | gpsd-1e3cac574dd0f03d251066043f6bbcef64751958.tar.gz |
Use LOG_* symbol when setting/comparing log level
Currently, debug level 0 is actually LOG_SHOUT.
This change doesn't affect generated binary code.
-rw-r--r-- | gpsdecode.c | 2 | ||||
-rw-r--r-- | gpspacket.c | 2 | ||||
-rw-r--r-- | libgpsd_core.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/gpsdecode.c b/gpsdecode.c index c64f2d02..b5eda7c4 100644 --- a/gpsdecode.c +++ b/gpsdecode.c @@ -639,7 +639,7 @@ static void encode(FILE *fpin, FILE *fpout) memset(&policy, '\0', sizeof(policy)); memset(&session, '\0', sizeof(session)); session.context = &context; - context.errout.debug = 0; + context.errout.debug = LOG_SHOUT; context.errout.label = "gpsdecode"; (void)strlcpy(session.gpsdata.dev.path, "stdin", diff --git a/gpspacket.c b/gpspacket.c index d8b36685..05d8f961 100644 --- a/gpspacket.c +++ b/gpspacket.c @@ -21,7 +21,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; } 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 |