Fix outstanding cppcheck errors
lib/dns/sdb.c:1145:warning: Either the condition '(sdb)!=((void*)0)' is redundant or there is possible null pointer dereference: sdb." lib/dns/sdb.c:1208: Either the condition '(node)!=((void*)0)' is redundant or there is possible null pointer dereference: sdbnode.
This commit is contained in:
+4
-2
@@ -1141,11 +1141,13 @@ createiterator(dns_db_t *db, unsigned int options, dns_dbiterator_t **iteratorp)
|
||||
{
|
||||
dns_sdb_t *sdb = (dns_sdb_t *)db;
|
||||
sdb_dbiterator_t *sdbiter;
|
||||
dns_sdbimplementation_t *imp = sdb->implementation;
|
||||
dns_sdbimplementation_t *imp;
|
||||
isc_result_t result;
|
||||
|
||||
REQUIRE(VALID_SDB(sdb));
|
||||
|
||||
imp = sdb->implementation;
|
||||
|
||||
if (imp->methods->allnodes == NULL)
|
||||
return (ISC_R_NOTIMPLEMENTED);
|
||||
|
||||
@@ -1193,7 +1195,7 @@ findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
|
||||
dns_rdatalist_t *list;
|
||||
dns_sdbnode_t *sdbnode = (dns_sdbnode_t *)node;
|
||||
|
||||
REQUIRE(VALID_SDBNODE(node));
|
||||
REQUIRE(VALID_SDBNODE(sdbnode));
|
||||
|
||||
UNUSED(db);
|
||||
UNUSED(version);
|
||||
|
||||
Reference in New Issue
Block a user