|
@@ -23,49 +23,49 @@
|
|
*/
|
|
*/
|
|
int faux_log_facility(const char *str, int *facility) {
|
|
int faux_log_facility(const char *str, int *facility) {
|
|
|
|
|
|
- if (!faux_str_casecmp(str, "local0"))
|
|
|
|
|
|
+ if (faux_str_casecmp(str, "local0") == 0)
|
|
*facility = LOG_LOCAL0;
|
|
*facility = LOG_LOCAL0;
|
|
- else if (!faux_str_casecmp(str, "local1"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "local1") == 0)
|
|
*facility = LOG_LOCAL1;
|
|
*facility = LOG_LOCAL1;
|
|
- else if (!faux_str_casecmp(str, "local2"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "local2") == 0)
|
|
*facility = LOG_LOCAL2;
|
|
*facility = LOG_LOCAL2;
|
|
- else if (!faux_str_casecmp(str, "local3"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "local3") == 0)
|
|
*facility = LOG_LOCAL3;
|
|
*facility = LOG_LOCAL3;
|
|
- else if (!faux_str_casecmp(str, "local4"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "local4") == 0)
|
|
*facility = LOG_LOCAL4;
|
|
*facility = LOG_LOCAL4;
|
|
- else if (!faux_str_casecmp(str, "local5"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "local5") == 0)
|
|
*facility = LOG_LOCAL5;
|
|
*facility = LOG_LOCAL5;
|
|
- else if (!faux_str_casecmp(str, "local6"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "local6") == 0)
|
|
*facility = LOG_LOCAL6;
|
|
*facility = LOG_LOCAL6;
|
|
- else if (!faux_str_casecmp(str, "local7"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "local7") == 0)
|
|
*facility = LOG_LOCAL7;
|
|
*facility = LOG_LOCAL7;
|
|
- else if (!faux_str_casecmp(str, "auth"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "auth") == 0)
|
|
*facility = LOG_AUTH;
|
|
*facility = LOG_AUTH;
|
|
#ifdef LOG_AUTHPRIV
|
|
#ifdef LOG_AUTHPRIV
|
|
- else if (!faux_str_casecmp(str, "authpriv"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "authpriv") == 0)
|
|
*facility = LOG_AUTHPRIV;
|
|
*facility = LOG_AUTHPRIV;
|
|
#endif
|
|
#endif
|
|
- else if (!faux_str_casecmp(str, "cron"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "cron") == 0)
|
|
*facility = LOG_CRON;
|
|
*facility = LOG_CRON;
|
|
- else if (!faux_str_casecmp(str, "daemon"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "daemon") == 0)
|
|
*facility = LOG_DAEMON;
|
|
*facility = LOG_DAEMON;
|
|
#ifdef LOG_FTP
|
|
#ifdef LOG_FTP
|
|
- else if (!faux_str_casecmp(str, "ftp"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "ftp") == 0)
|
|
*facility = LOG_FTP;
|
|
*facility = LOG_FTP;
|
|
#endif
|
|
#endif
|
|
- else if (!faux_str_casecmp(str, "kern"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "kern") == 0)
|
|
*facility = LOG_KERN;
|
|
*facility = LOG_KERN;
|
|
- else if (!faux_str_casecmp(str, "lpr"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "lpr") == 0)
|
|
*facility = LOG_LPR;
|
|
*facility = LOG_LPR;
|
|
- else if (!faux_str_casecmp(str, "mail"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "mail") == 0)
|
|
*facility = LOG_MAIL;
|
|
*facility = LOG_MAIL;
|
|
- else if (!faux_str_casecmp(str, "news"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "news") == 0)
|
|
*facility = LOG_NEWS;
|
|
*facility = LOG_NEWS;
|
|
- else if (!faux_str_casecmp(str, "syslog"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "syslog") == 0)
|
|
*facility = LOG_SYSLOG;
|
|
*facility = LOG_SYSLOG;
|
|
- else if (!faux_str_casecmp(str, "user"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "user") == 0)
|
|
*facility = LOG_USER;
|
|
*facility = LOG_USER;
|
|
- else if (!faux_str_casecmp(str, "uucp"))
|
|
|
|
|
|
+ else if (faux_str_casecmp(str, "uucp") == 0)
|
|
*facility = LOG_UUCP;
|
|
*facility = LOG_UUCP;
|
|
else
|
|
else
|
|
return -1;
|
|
return -1;
|