Skip to content

Commit

Permalink
chore: fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
romange committed Nov 8, 2024
1 parent 0decf9a commit 70b002f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
4 changes: 1 addition & 3 deletions src/core/qlist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,7 @@ bool NodeAllowMerge(const quicklistNode* a, const quicklistNode* b, const int fi
/* approximate merged listpack size (- 7 to remove one listpack
* header/trailer, see LP_HDR_SIZE and LP_EOF) */
unsigned int merge_sz = a->sz + b->sz - 7;
if (ABSL_PREDICT_FALSE(quicklistNodeExceedsLimit(fill, merge_sz, a->count + b->count)))
return false;
return true;
return quicklistNodeExceedsLimit(fill, merge_sz, a->count + b->count);
}

quicklistNode* CreateNode() {
Expand Down
6 changes: 1 addition & 5 deletions src/core/qlist_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ class QListTest : public ::testing::Test {
vector<string> QListTest::ToItems() const {
vector<string> res;
auto cb = [&](const QList::Entry& e) {
if (e.value)
res.push_back(string(e.view()));
else
res.push_back(to_string(e.longval));

res.push_back(e.value ? string(e.view()) : to_string(e.longval));
return true;
};

Expand Down

0 comments on commit 70b002f

Please sign in to comment.