From 83c7f66d672a00ca4d8a76d9e329a6f5d5c596b7 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 18 Mar 2024 16:22:24 -0700 Subject: [PATCH] Remove some redundant nullptr checks --- ConflictSet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index cfe1043..6b46756 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -2349,6 +2349,9 @@ Iterator firstGeq(Node *n, const std::span key) { goto downLeftSpine; } else { n = nextSibling(n); + if (n == nullptr) { + return {nullptr, 1}; + } goto downLeftSpine; } } @@ -2379,9 +2382,6 @@ Iterator firstGeq(Node *n, const std::span key) { } } downLeftSpine: - if (n == nullptr) { - return {nullptr, 1}; - } for (;;) { if (n->entryPresent) { return {n, 1};