From d0e3da2ee0967f50ab731b11efaedab87db0c13f Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Wed, 10 Feb 2016 13:25:03 -0500 Subject: [PATCH] common/buffer: correct list_iterator::operator!= behavior It was actually behaving as if it were operator==. This results in loops running off the end of empty bufferlists. Signed-off-by: Jason Dillaman --- src/common/buffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/buffer.cc b/src/common/buffer.cc index ae1ffbe4b3f..eb43810a325 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -1085,7 +1085,7 @@ static simple_spinlock_t buffer_debug_lock = SIMPLE_SPINLOCK_INITIALIZER; template bool buffer::list::iterator_impl::operator!=(const buffer::list::iterator_impl& rhs) const { - return bl == rhs.bl && off == rhs.off; + return bl != rhs.bl || off != rhs.off; } template -- 2.39.5