From: Peter van Dijk Date: Fri, 28 Feb 2025 11:02:22 +0000 (+0100) Subject: explicit int checks X-Git-Tag: dnsdist-2.0.0-alpha1~56^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e8c23ea6aeb052b78928a10b98691e108eb12874;p=thirdparty%2Fpdns.git explicit int checks --- diff --git a/modules/lmdbbackend/lmdbbackend.cc b/modules/lmdbbackend/lmdbbackend.cc index b7e1877579..8385bd1b0d 100644 --- a/modules/lmdbbackend/lmdbbackend.cc +++ b/modules/lmdbbackend/lmdbbackend.cc @@ -1468,7 +1468,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(); } @@ -1531,7 +1531,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; @@ -1569,7 +1569,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"<