]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Suppress cppcheck false positive nullPointerRedundantCheck
authorMatthijs Mekking <matthijs@isc.org>
Wed, 5 Feb 2020 10:33:15 +0000 (11:33 +0100)
committerOndřej Surý <ondrej@isc.org>
Sat, 8 Feb 2020 14:32:42 +0000 (06:32 -0800)
lib/dns/master.c
lib/dns/tcpmsg.c
lib/isccc/alist.c

index b71bd368483bce3796925b453427d225a463af74..b85ecd68a3a5bad37ffb14fd312396599705a74d 100644 (file)
@@ -3088,7 +3088,9 @@ resign_fromlist(dns_rdatalist_t *this, dns_loadctx_t *lctx) {
        else
                when = sig.timeexpire - lctx->resign;
 
+       /* cppcheck-suppress nullPointerRedundantCheck */
        rdata = ISC_LIST_NEXT(rdata, link);
+       /* cppcheck-suppress nullPointerRedundantCheck */
        while (rdata != NULL) {
                (void)dns_rdata_tostruct(rdata, &sig, NULL);
                if (isc_serial_gt(sig.timesigned, lctx->now))
index 8f5a97b0bd21828c54e0aca25cfea7e404fe55a7..4627ca69d97ef5d1d320d345a92b5ce3cf25920b 100644 (file)
@@ -50,7 +50,9 @@ recv_length(isc_task_t *task, isc_event_t *ev_in) {
        INSIST(VALID_TCPMSG(tcpmsg));
 
        dev = &tcpmsg->event;
+       /* cppcheck-suppress nullPointerRedundantCheck */
        tcpmsg->address = ev->address;
+       /* cppcheck-suppress nullPointerRedundantCheck */
 
        if (ev->result != ISC_R_SUCCESS) {
                tcpmsg->result = ev->result;
index 22992d69848761731c23c9e4f3cdc48e72e5c6d8..80abd30e1417ecafebb2bd8954aa7c7a978eeeab 100644 (file)
@@ -137,7 +137,9 @@ isccc_alist_delete(isccc_sexpr_t *alist, const char *key)
                INSIST(rest->type == ISCCC_SEXPRTYPE_DOTTEDPAIR);
                car = CAR(rest);
                INSIST(car != NULL && car->type == ISCCC_SEXPRTYPE_DOTTEDPAIR);
+               /* cppcheck-suppress nullPointerRedundantCheck */
                caar = CAR(car);
+               /* cppcheck-suppress nullPointerRedundantCheck */
                if (caar->type == ISCCC_SEXPRTYPE_STRING &&
                    strcmp(caar->value.as_string, key) == 0) {
                        CDR(prev) = CDR(rest);