diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d1e7c3f14b..4d34fd96f2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -697,6 +697,7 @@ coccinelle: - '**/*.c' - '**/*.h' - 'cocci/**' + - 'util/check-cocci.sh' - *rule_mr_manual - *rule_tag - *rule_source_other_than_mr diff --git a/cocci/DNS_TYPEPAIR_VALUE.spatch b/cocci/DNS_TYPEPAIR_VALUE.spatch index fe75b36926..34f5230300 100644 --- a/cocci/DNS_TYPEPAIR_VALUE.spatch +++ b/cocci/DNS_TYPEPAIR_VALUE.spatch @@ -2,5 +2,5 @@ expression e; @@ -DNS_TYPEPAIR_VALUE(dns_rdatatype_rrsig, -+DNS_SIGTYPE( ++DNS_SIGTYPEPAIR( e) diff --git a/lib/isc/netmgr/http.c b/lib/isc/netmgr/http.c index 814deaf371..645f256059 100644 --- a/lib/isc/netmgr/http.c +++ b/lib/isc/netmgr/http.c @@ -3539,9 +3539,7 @@ isc__nm_base64url_to_base64(isc_mem_t *mem, const char *base64url, INSIST(i == len); - if (res_len != NULL) { - *res_len = len; - } + SET_IF_NOT_NULL(res_len, len); res[len] = '\0'; @@ -3592,9 +3590,7 @@ isc__nm_base64_to_base64url(isc_mem_t *mem, const char *base64, } } end: - if (res_len) { - *res_len = i; - } + SET_IF_NOT_NULL(res_len, i); res[i] = '\0'; diff --git a/util/check-cocci.sh b/util/check-cocci.sh index 5dd382c6ad..09783ea9af 100755 --- a/util/check-cocci.sh +++ b/util/check-cocci.sh @@ -23,7 +23,7 @@ run_spatch() { echo "Applying semantic patch $spatch..." spatch --jobs "${TEST_PARALLEL_JOBS:-1}" --sp-file "$spatch" --use-gitgrep --dir "." --include-headers $spatchargs >>"$patch" 2>cocci.stderr cat cocci.stderr - if grep -q -e "parse error" cocci.stderr; then + if grep -q -e "parse error" -e "EXN: Failure" cocci.stderr; then ret=1 fi if [ "$(wc <"$patch" -l)" -gt "0" ]; then