Avoid redundant null check in some cases

This commit is contained in:
2024-03-19 14:29:13 -07:00
parent ef9b789745
commit cb4c2b7e1e
+6 -3
View File
@@ -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;