Various little fixes found by coccinelle
The coccinellery repository provides many little semantic patches to fix common problems in the code. The number of semantic patches in the coccinellery repository is high and most of the semantic patches apply only for Linux, so it doesn't make sense to run them on regular basis as the processing takes a lot of time.
The list of issue found in BIND 9, by no means complete, includes:
- double assignment to a variable
-
continue
at the end of the loop - double checks for
NULL
- useless checks for
NULL
(cannot beNULL
, because of earlier return) - using
0
instead ofNULL
- useless extra condition (
if (foo) return; if (!foo) { ...; }
) - removing & in front of static functions passed as arguments
Edited by Ondřej Surý