diff options
author | Matt Kraai <kraai@debian.org> | 2000-12-11 20:13:37 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2000-12-11 20:13:37 +0000 |
commit | 5a964f9d0b96ab19198a9b5d27e855061aad0959 (patch) | |
tree | 91ac480d231821175ba308ddc1a16b21703a8804 | |
parent | 20c2bdd7f2d658a38578e7061f8acc6ca56a7c28 (diff) | |
download | busybox-5a964f9d0b96ab19198a9b5d27e855061aad0959.tar.gz |
Keep unknown priorities from segfaulting.
-rw-r--r-- | sysklogd/syslogd.c | 2 | ||||
-rw-r--r-- | syslogd.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 7501380f6..a599b2113 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -143,7 +143,7 @@ static void logMessage (int pri, char *msg) c_fac->c_name && !(c_fac->c_val == LOG_FAC(pri) << 3); c_fac++); for (c_pri = prioritynames; c_pri->c_name && !(c_pri->c_val == LOG_PRI(pri)); c_pri++); - if (*c_fac->c_name == '\0' || *c_pri->c_name == '\0') + if (c_fac->c_name == NULL || c_pri->c_name == NULL) snprintf(res, sizeof(res), "<%d>", pri); else snprintf(res, sizeof(res), "%s.%s", c_fac->c_name, c_pri->c_name); @@ -143,7 +143,7 @@ static void logMessage (int pri, char *msg) c_fac->c_name && !(c_fac->c_val == LOG_FAC(pri) << 3); c_fac++); for (c_pri = prioritynames; c_pri->c_name && !(c_pri->c_val == LOG_PRI(pri)); c_pri++); - if (*c_fac->c_name == '\0' || *c_pri->c_name == '\0') + if (c_fac->c_name == NULL || c_pri->c_name == NULL) snprintf(res, sizeof(res), "<%d>", pri); else snprintf(res, sizeof(res), "%s.%s", c_fac->c_name, c_pri->c_name); |