2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

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 be `NULL`, because of earlier return)
- using `0` instead of `NULL`
- useless extra condition (`if (foo) return; if (!foo) { ...; }`)
- removing & in front of static functions passed as arguments
This commit is contained in:
Ondřej Surý
2019-09-09 14:05:31 +02:00
parent c2e8a111f5
commit 288f5a4b52
24 changed files with 59 additions and 98 deletions

View File

@@ -211,9 +211,7 @@ cleanup:
sizeof(*plugin));
}
if (handle != NULL) {
(void) dlclose(handle);
}
(void) dlclose(handle);
}
return (result);