summaryrefslogtreecommitdiffstats
path: root/liblog
diff options
context:
space:
mode:
authorTing-Yuan Huang <laszio@google.com>2017-09-06 05:16:45 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-09-06 05:16:45 +0000
commit5d1706346c8327f96682a30506cb7cc0ed4ce26b (patch)
tree2f1832a9589025c4ab6b418f9c1214173894064a /liblog
parent6a057b43b22c29e680a9a865df2c709b56152141 (diff)
parentd3ffb4344e77f97b6baaf397c8d5365fa7d57b51 (diff)
downloadsystem_core-5d1706346c8327f96682a30506cb7cc0ed4ce26b.tar.gz
system_core-5d1706346c8327f96682a30506cb7cc0ed4ce26b.tar.bz2
system_core-5d1706346c8327f96682a30506cb7cc0ed4ce26b.zip
Merge "Suppress false-positive static analyzer warnings" am: 0c89aaec1f am: 2ee27bfd0d
am: d3ffb4344e Change-Id: Ica8a4b2e224e278308e9dca377751e462be4ae6d
Diffstat (limited to 'liblog')
-rw-r--r--liblog/local_logger.c1
-rw-r--r--liblog/logprint.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/liblog/local_logger.c b/liblog/local_logger.c
index 522867d4f..563cb3f9b 100644
--- a/liblog/local_logger.c
+++ b/liblog/local_logger.c
@@ -222,6 +222,7 @@ static int LogBufferLog(struct LogBuffer* log,
log->last[logId] = node->prev;
}
list_remove(node);
+ LOG_ALWAYS_FATAL_IF(node == log->last[logId], "corrupted list");
free(e);
}
/* add entry to list */
diff --git a/liblog/logprint.c b/liblog/logprint.c
index b62f8b446..a2839bfb6 100644
--- a/liblog/logprint.c
+++ b/liblog/logprint.c
@@ -250,6 +250,7 @@ LIBLOG_ABI_PUBLIC void android_log_format_free(AndroidLogFormat* p_format) {
while (!list_empty(&convertHead)) {
struct listnode* node = list_head(&convertHead);
list_remove(node);
+ LOG_ALWAYS_FATAL_IF(node == list_head(&convertHead), "corrupted list");
free(node);
}
}