From: xie xingguo Date: Sat, 1 Jul 2017 07:20:30 +0000 (+0800) Subject: common: fix log warnings X-Git-Tag: ses5-milestone8^2~5^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=01d7fbe102d9ee5c0f3103226a6be80533eb9f6b;p=ceph.git common: fix log warnings /home/jenkins-build/build/workspace/ceph-pull-requests/src/common/LogEntry.cc:54:24: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses] } else if (level_str == "warn" | level_str == "warning") { ^ /home/jenkins-build/build/workspace/ceph-pull-requests/src/common/LogEntry.cc:56:24: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses] } else if (level_str == "error" | level_str == "err") { Signed-off-by: xie xingguo --- diff --git a/src/common/LogEntry.cc b/src/common/LogEntry.cc index d0d3e93dd2049..d9100fc46a256 100644 --- a/src/common/LogEntry.cc +++ b/src/common/LogEntry.cc @@ -51,9 +51,9 @@ clog_type LogEntry::str_to_level(std::string const &str) return CLOG_INFO; } else if (level_str == "sec") { return CLOG_SEC; - } else if (level_str == "warn" | level_str == "warning") { + } else if (level_str == "warn" || level_str == "warning") { return CLOG_WARN; - } else if (level_str == "error" | level_str == "err") { + } else if (level_str == "error" || level_str == "err") { return CLOG_ERROR; } else { return CLOG_UNKNOWN;