diff options
author | jsorg71 <jsorg71> | 2007-02-03 06:21:58 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2007-02-03 06:21:58 +0000 |
commit | 084a20ac1be0698ce45169906d1e2c9fd04121a3 (patch) | |
tree | 6fb4ac05c7a7da537143c440ba08bdefe2c69b4d | |
parent | f784f69395304742a7d8e5c59e3fdd05da4b71bc (diff) | |
download | xrdp-proprietary-084a20ac1be0698ce45169906d1e2c9fd04121a3.tar.gz xrdp-proprietary-084a20ac1be0698ce45169906d1e2c9fd04121a3.zip |
dont need length in strcmp
-rw-r--r-- | common/log.c | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/common/log.c b/common/log.c index cc384199..33732827 100644 --- a/common/log.c +++ b/common/log.c @@ -257,7 +257,7 @@ log_start(const char* progname, const char* logfile, const unsigned int loglvl, /******************************************************************************/ void DEFAULT_CC -log_end() +log_end(void) { /* if log is closed, quit silently */ if (0 == l_cfg) @@ -266,7 +266,7 @@ log_end() } /* closing log file */ - log_message(LOG_LEVEL_ALWAYS,"shutting down log subsystem..."); + log_message(LOG_LEVEL_ALWAYS, "shutting down log subsystem..."); if (0 > l_cfg->fd) { @@ -298,33 +298,26 @@ log_end() int DEFAULT_CC log_text2level(char* buf) { - if (0 == g_strncasecmp(buf, "0", 2) || - 0 == g_strncasecmp(buf, "core", 5)) + if (0 == g_strcasecmp(buf, "0") || + 0 == g_strcasecmp(buf, "core")) { return LOG_LEVEL_ALWAYS; } - else if (0 == g_strncasecmp(buf, "1", 2) || - 0 == g_strncasecmp(buf, "error", 6)) + else if (0 == g_strcasecmp(buf, "1") || + 0 == g_strcasecmp(buf, "error")) { return LOG_LEVEL_ERROR; } - else if (0 == g_strncasecmp(buf, "2", 2) || - 0 == g_strncasecmp(buf, "warn", 5) || - 0 == g_strncasecmp(buf, "warning", 8)) + else if (0 == g_strcasecmp(buf, "2") || + 0 == g_strcasecmp(buf, "warn") || + 0 == g_strcasecmp(buf, "warning")) { return LOG_LEVEL_WARNING; } - else if (0 == g_strncasecmp(buf, "3", 2) || - 0 == g_strncasecmp(buf, "info", 5)) + else if (0 == g_strcasecmp(buf, "3") || + 0 == g_strcasecmp(buf, "info")) { return LOG_LEVEL_INFO; } - /* else if (0 == g_strncasecmp(buf, "1", 2) || - 0 == g_strncasecmp(buf, "true", 5) || - 0 == g_strncasecmp(buf, "yes", 4)) - { - return LOG_LEVEL_DEBUG; - }*/ - return LOG_LEVEL_DEBUG; } |