aboutsummaryrefslogtreecommitdiffstats
path: root/libc/bionic/syslog.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-07-23 11:38:38 -0700
committerElliott Hughes <enh@google.com>2014-07-23 11:38:38 -0700
commitafe6360627ef3f0e9bc8f45535fbfae3354f3ae0 (patch)
tree81d3cf23f17e54ad6362ed474f6f0fb822574ffd /libc/bionic/syslog.cpp
parent467e49be70231f55bd7ba908407b4413294d3bfc (diff)
downloadandroid_bionic-afe6360627ef3f0e9bc8f45535fbfae3354f3ae0.tar.gz
android_bionic-afe6360627ef3f0e9bc8f45535fbfae3354f3ae0.tar.bz2
android_bionic-afe6360627ef3f0e9bc8f45535fbfae3354f3ae0.zip
Fix belated review comments on syslog change.
Bug: 14292866 Change-Id: I3cd92084cb55b5673f6ba62d51952941b79deb51
Diffstat (limited to 'libc/bionic/syslog.cpp')
-rw-r--r--libc/bionic/syslog.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/bionic/syslog.cpp b/libc/bionic/syslog.cpp
index 7e153eb16..29f892a20 100644
--- a/libc/bionic/syslog.cpp
+++ b/libc/bionic/syslog.cpp
@@ -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;