Fix belated review comments on syslog change.

Bug: 14292866

(cherry picked from commit afe6360627)

Change-Id: I8e3cc6b37b2539e51a27261ffb5d6e58266ce11d
This commit is contained in:
Elliott Hughes
2014-07-23 11:38:38 -07:00
parent 2aa142ffb2
commit 4126c12961
3 changed files with 45 additions and 41 deletions

View File

@@ -14,9 +14,8 @@
* limitations under the License.
*/
#include <syslog.h>
#include <stdlib.h>
#include <syslog.h>
#include "private/libc_logging.h"
@@ -24,6 +23,7 @@ static const char* syslog_log_tag = NULL;
static int syslog_priority_mask = 0xff;
void closelog() {
syslog_log_tag = NULL;
}
void openlog(const char* log_tag, int /*options*/, int /*facility*/) {
@@ -61,7 +61,7 @@ void vsyslog(int priority, const char* fmt, va_list args) {
// What's our Android log priority?
priority &= LOG_PRIMASK;
int android_log_priority;
if (priority < LOG_ERR) {
if (priority <= LOG_ERR) {
android_log_priority = ANDROID_LOG_ERROR;
} else if (priority == LOG_WARNING) {
android_log_priority = ANDROID_LOG_WARN;