This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/tsfile.git
The following commit(s) were added to refs/heads/develop by this push:
new 5783c5f7 Fix SimpleListNode::remove (#117)
5783c5f7 is described below
commit 5783c5f75f767482c9ac4eddf3bdce910458734d
Author: Hongzhi Gao <[email protected]>
AuthorDate: Tue Jun 18 11:33:11 2024 +0800
Fix SimpleListNode::remove (#117)
---
cpp/src/common/container/list.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cpp/src/common/container/list.h b/cpp/src/common/container/list.h
index 271b9881..88a73379 100644
--- a/cpp/src/common/container/list.h
+++ b/cpp/src/common/container/list.h
@@ -119,10 +119,11 @@ class SimpleList {
while (cur && cur->data_ != target) {
cur = cur->next_;
}
- if (cur) {
+ if (!cur) {
return common::E_NOT_EXIST;
}
prev->next_ = cur->next_;
+ size_--;
// cur is allocated from PageArena, it should not reclaim now
return common::E_OK;
}