From 048c2608ea42a67f8d467ac13b2eadbc3fbd32a9 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Fri, 28 Feb 2025 12:02:22 +0100 Subject: [PATCH] explicit int checks (cherry picked from commit e8c23ea6aeb052b78928a10b98691e108eb12874) --- modules/lmdbbackend/lmdbbackend.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/lmdbbackend/lmdbbackend.cc b/modules/lmdbbackend/lmdbbackend.cc index de949eddbeb67..1806b0b001f50 100644 --- a/modules/lmdbbackend/lmdbbackend.cc +++ b/modules/lmdbbackend/lmdbbackend.cc @@ -1405,7 +1405,7 @@ bool LMDBBackend::list(const DNSName& target, int /* id */, bool include_disable d_matchkey = co(di.id); MDBOutVal key, val; - if (d_getcursor->prefix(d_matchkey, key, val)) { + if (d_getcursor->prefix(d_matchkey, key, val) != 0) { d_getcursor.reset(); } @@ -1467,7 +1467,7 @@ void LMDBBackend::lookup(const QType& type, const DNSName& qdomain, int zoneId, d_matchkey = co(zoneId, relqname, type.getCode()); } - if (d_getcursor->prefix(d_matchkey, key, val)) { + if (d_getcursor->prefix(d_matchkey, key, val) != 0) { d_getcursor.reset(); if (d_dolog) { g_log << Logger::Warning << "Query " << ((long)(void*)this) << ": " << d_dtime.udiffNoReset() << " us to execute (found nothing)" << endl; @@ -1505,7 +1505,7 @@ bool LMDBBackend::get(DNSZoneRecord& zr) if (zr.dr.d_type == QType::NSEC3) { // Hit a magic NSEC3 skipping - if (d_getcursor->next(d_currentKey, d_currentVal)) { + if (d_getcursor->next(d_currentKey, d_currentVal) != 0) { // cerr<<"resetting d_getcursor 1"<= d_currentrrset.size()) { d_currentrrset.clear(); // will invalidate lrr - if (d_getcursor->next(d_currentKey, d_currentVal)) { + if (d_getcursor->next(d_currentKey, d_currentVal) != 0) { // cerr<<"resetting d_getcursor 2"<txn->getCursor(txn->db->dbi); MDBOutVal key, val; - if (cursor.prefix(matchkey, key, val)) { + if (cursor.prefix(matchkey, key, val) != 0) { // cout << "Could not find anything"<