commit c2d182f59ae7a25214889fb160ae545849a01468
Author: Jean-Marc Lasgouttes <[email protected]>
Date:   Thu Jul 6 14:14:43 2017 +0200

    Remove test that is not needed.
    
    We know that buf is not null at this point.
    
    Spotted by coverity.
---
 src/BufferList.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/BufferList.cpp b/src/BufferList.cpp
index 33f40a0..a61b0bf 100644
--- a/src/BufferList.cpp
+++ b/src/BufferList.cpp
@@ -96,7 +96,7 @@ void BufferList::release(Buffer * buf)
        BufferStorage::iterator const it =
                find(bstore.begin(), bstore.end(), buf);
        if (it != bstore.end()) {
-               Buffer const * parent = buf ? buf->parent() : 0;
+               Buffer const * parent = buf->parent();
                Buffer * tmp = (*it);
                bstore.erase(it);
                LASSERT(tmp, return);

Reply via email to