aboutsummaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_list.h
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2013-01-18 20:06:45 +0000
committerAndrew Turner <andrew@FreeBSD.org>2013-01-18 20:06:45 +0000
commit58aabf08b77d221489f10e274812ec60917c21a8 (patch)
treeb946f82269be87d83f086167c762c362e734c5bb /lib/sanitizer_common/sanitizer_list.h
parent37dfff057418e02f8e5322da12684dd927e3d881 (diff)
downloadsrc-58aabf08b77d221489f10e274812ec60917c21a8.tar.gz
src-58aabf08b77d221489f10e274812ec60917c21a8.zip
Import compiler-rt r172839.vendor/compiler-rt/compiler-rt-r172839
Notes
Notes: svn path=/vendor/compiler-rt/dist/; revision=245614 svn path=/vendor/compiler-rt/compiler-rt-r172839/; revision=245615; tag=vendor/compiler-rt/compiler-rt-r172839
Diffstat (limited to 'lib/sanitizer_common/sanitizer_list.h')
-rw-r--r--lib/sanitizer_common/sanitizer_list.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_list.h b/lib/sanitizer_common/sanitizer_list.h
index ef98eee12317..f61d28f3d900 100644
--- a/lib/sanitizer_common/sanitizer_list.h
+++ b/lib/sanitizer_common/sanitizer_list.h
@@ -72,6 +72,8 @@ struct IntrusiveList {
void append_front(IntrusiveList<Item> *l) {
CHECK_NE(this, l);
+ if (l->empty())
+ return;
if (empty()) {
*this = *l;
} else if (!l->empty()) {
@@ -84,6 +86,8 @@ struct IntrusiveList {
void append_back(IntrusiveList<Item> *l) {
CHECK_NE(this, l);
+ if (l->empty())
+ return;
if (empty()) {
*this = *l;
} else {