summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot2017-02-09 19:14:22 -0600
committerGerrit Code Review2017-02-09 19:14:23 -0600
commit9fcabf739b23dd04cf1d43da74adfd6bbd51e493 (patch)
treef408a32a4bd5b9a0516e2882d791810a1f6f70e4 /liblog/logd_reader.c
parentbab6ec555c91d06dd075d3f8e9e3a52bfbcf7cec (diff)
parent2c2337a293dfcd7a144996048e48c2a54b44c5f8 (diff)
downloadplatform-system-core-9fcabf739b23dd04cf1d43da74adfd6bbd51e493.tar.gz
platform-system-core-9fcabf739b23dd04cf1d43da74adfd6bbd51e493.tar.xz
platform-system-core-9fcabf739b23dd04cf1d43da74adfd6bbd51e493.zip
Merge "Check against LOG_ID_MAX instead of LOG_ID_KERNEL"
Diffstat (limited to 'liblog/logd_reader.c')
-rw-r--r--liblog/logd_reader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/liblog/logd_reader.c b/liblog/logd_reader.c
index ccc7da8ae..9411f36cb 100644
--- a/liblog/logd_reader.c
+++ b/liblog/logd_reader.c
@@ -91,7 +91,7 @@ LIBLOG_HIDDEN struct android_log_transport_read logdLoggerRead = {
91 91
92static int logdAvailable(log_id_t logId) 92static int logdAvailable(log_id_t logId)
93{ 93{
94 if (logId > LOG_ID_KERNEL) { 94 if (logId >= LOG_ID_MAX || logId == LOG_ID_KERNEL) {
95 return -EINVAL; 95 return -EINVAL;
96 } 96 }
97 if (logId == LOG_ID_SECURITY) { 97 if (logId == LOG_ID_SECURITY) {