diff options
author | Ting-Yuan Huang <laszio@google.com> | 2017-09-06 05:13:18 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-09-06 05:13:18 +0000 |
commit | d3ffb4344e77f97b6baaf397c8d5365fa7d57b51 (patch) | |
tree | 2b40fc6a59fbfcf3f16cff086ca55536c67aa0df /liblog | |
parent | dd3fbb94d8738331f243d752494e0ebd30c72010 (diff) | |
parent | 2ee27bfd0dcf6732258bb222cac6342b2aaab4fa (diff) | |
download | system_core-d3ffb4344e77f97b6baaf397c8d5365fa7d57b51.tar.gz system_core-d3ffb4344e77f97b6baaf397c8d5365fa7d57b51.tar.bz2 system_core-d3ffb4344e77f97b6baaf397c8d5365fa7d57b51.zip |
Merge "Suppress false-positive static analyzer warnings" am: 0c89aaec1f
am: 2ee27bfd0d
Change-Id: I3a66607388d54bc5faec076baa2280dde9bddb01
Diffstat (limited to 'liblog')
-rw-r--r-- | liblog/local_logger.c | 1 | ||||
-rw-r--r-- | liblog/logprint.c | 1 |
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); } } |