forked from weaselab/conflict-set
Avoid redundant null check in some cases
This commit is contained in:
+6
-3
@@ -1540,6 +1540,9 @@ bool checkPointRead(Node *n, const std::span<const uint8_t> key,
|
||||
goto downLeftSpine;
|
||||
} else {
|
||||
n = nextSibling(n);
|
||||
if (n == nullptr) {
|
||||
return true;
|
||||
}
|
||||
goto downLeftSpine;
|
||||
}
|
||||
}
|
||||
@@ -1556,6 +1559,9 @@ bool checkPointRead(Node *n, const std::span<const uint8_t> key,
|
||||
goto downLeftSpine;
|
||||
} else {
|
||||
n = nextSibling(n);
|
||||
if (n == nullptr) {
|
||||
return true;
|
||||
}
|
||||
goto downLeftSpine;
|
||||
}
|
||||
}
|
||||
@@ -1570,9 +1576,6 @@ bool checkPointRead(Node *n, const std::span<const uint8_t> key,
|
||||
}
|
||||
}
|
||||
downLeftSpine:
|
||||
if (n == nullptr) {
|
||||
return true;
|
||||
}
|
||||
for (;;) {
|
||||
if (n->entryPresent) {
|
||||
return n->entry.rangeVersion <= readVersion;
|
||||
|
||||
Reference in New Issue
Block a user