]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-dencoder: Silence coverity CID 1412579 15744/head
authorBrad Hubbard <bhubbard@redhat.com>
Sat, 17 Jun 2017 01:44:01 +0000 (11:44 +1000)
committerBrad Hubbard <bhubbard@redhat.com>
Sun, 18 Jun 2017 23:27:26 +0000 (09:27 +1000)
commitb61c43a5553ef3cab79359a7d9100deacb49cf75
treeb20e7418bde2c47ba7b72e1af6ab1f331f666732
parentd1337f38fcc30fae9e06fc0ae04a3c05f7437395
ceph-dencoder: Silence coverity CID 1412579

141         if (i == 0)
142           i = m_list.size();
143         if ((i == 0) || (i > m_list.size()))
144           return "invalid id for generated object";
145         typename list<T*>::iterator p = m_list.begin();
146         for (i--; i > 0 && p != m_list.end(); ++p, --i) ;
>>>     CID 1412579:  API usage errors  (INVALIDATE_ITERATOR)
>>>     Dereferencing iterator "p" though it is already past the end
of its container.
147         m_object = *p;
148         return string();
149       }
150
151       bool is_deterministic() override {
152         return !nondeterministic;

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
src/test/encoding/ceph_dencoder.cc