bind9/lib/dns
Ondřej Surý 288f5a4b52 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
2019-10-01 16:48:55 +02:00
..
include Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
rdata Add support for displaying EDNS option LLQ. 2019-08-28 16:13:43 +10:00
tests Tweak lib/dns/tests/tkey_test requirements 2019-09-12 14:25:57 +02:00
win32 Split dns_name_copy() into dns_name_copy() and dns_name_copynf() 2019-10-01 10:43:26 +10:00
.gitignore 4394. [func] Add rndc command "dnstap-reopen" to close and 2016-06-24 09:37:04 +10:00
acl.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
adb.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
api prep for 9.15.4 2019-09-09 12:34:47 +00:00
badcache.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
byaddr.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
cache.c Convert cache->live_tasks to reference counter. 2019-09-13 12:45:06 +10:00
callbacks.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
catz.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
client.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
clientinfo.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
compress.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
db.c Replace usage of isc_mem_put+isc_mem_detach with isc_mem_putanddetach 2019-07-31 10:26:40 +02:00
dbiterator.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
dbtable.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
diff.c Use coccinelle to cleanup the failure handling blocks from isc_mem_allocate 2019-07-23 15:32:35 -04:00
dispatch.c isc_event_allocate() cannot fail, remove the fail handling blocks 2019-08-30 08:55:34 +02:00
dlz.c Replace usage of isc_mem_put+isc_mem_detach with isc_mem_putanddetach 2019-07-31 10:26:40 +02:00
dns64.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
dnsrps.c Various little fixes found by coccinelle 2019-10-01 16:48:55 +02:00
dnssec.c address or suppress cppcheck warnings 2019-09-12 17:59:28 +10:00
dnstap.c Various little fixes found by coccinelle 2019-10-01 16:48:55 +02:00
dnstap.proto extend DNSTAP to record UPDATE requests and responses as a separate type 2018-10-03 01:03:56 -07:00
ds.c Various little fixes found by coccinelle 2019-10-01 16:48:55 +02:00
dst_api.c address or suppress cppcheck warnings 2019-09-12 17:59:28 +10:00
dst_internal.h Remove explicit '#include <config.h>' from the header files (the include should not have been there in the first place) 2019-03-08 15:15:05 +01:00
dst_openssl.h Use standard OPENSSL_NO_ENGINE instead of custom USE_ENGINE define 2018-05-03 15:32:43 +02:00
dst_parse.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
dst_parse.h Remove RSAMD5 support 2018-12-11 11:32:24 +01:00
dst_pkcs11.h Update license headers to not include years in copyright in all applicable files 2018-02-23 10:12:02 +01:00
dst_result.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
dyndb.c Use coccinelle to cleanup the failure handling blocks from isc_mem_strdup 2019-07-23 15:32:36 -04:00
ecdb.c Use reference counts instead of ISC_LIST_EMPTY to determine when to destroy ecdb. 2019-09-13 12:43:52 +10:00
ecs.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
fixedname.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
forward.c Replace usage of isc_mem_put+isc_mem_detach with isc_mem_putanddetach 2019-07-31 10:26:40 +02:00
gen-unix.h Exit the ./gen program on failed readdir() call 2019-05-27 16:13:16 +02:00
gen-win32.h Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
gen.c define ULLONG_MAX if not already defined 2019-06-25 09:47:24 +10:00
geoip2.c Use the semantic patch to change the usage isc_mem_create() to new API 2019-09-12 09:26:09 +02:00
gssapi_link.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
gssapictx.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
hmac_link.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
ipkeylist.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
iptable.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
journal.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
key.c Revert "Merge branch '996-wrong-key-id-is-displayed-for-rsamd5-keys' into 'master'" 2019-05-29 15:34:08 +02:00
keydata.c Use coccinelle to cleanup the failure handling blocks from isc_mem_allocate 2019-07-23 15:32:35 -04:00
keytable.c simplify dns_rbtnodechain_init() by removing unnecessary 'mctx' parameter 2019-08-29 10:03:36 -07:00
Kyuafile regen master 2017-12-29 01:44:18 +00:00
lib.c Use the semantic patch to change the usage isc_mem_create() to new API 2019-09-12 09:26:09 +02:00
log.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
lookup.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
Makefile.in remove all support for legacy GeoIP 2019-07-04 08:56:45 -07:00
mapapi begin preparation for 9.13.0 2018-05-21 11:50:38 -07:00
master.c isc_event_allocate() cannot fail, remove the fail handling blocks 2019-08-30 08:55:34 +02:00
masterdump.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
message.c Add support for displaying EDNS option LLQ. 2019-08-28 16:13:43 +10:00
name.c Split dns_name_copy() into dns_name_copy() and dns_name_copynf() 2019-10-01 10:43:26 +10:00
ncache.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
nsec.c address or suppress cppcheck warnings 2019-09-12 17:59:28 +10:00
nsec3.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
nta.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
openssl_link.c Use coccinelle to cleanup the failure handling blocks from isc_mem_allocate 2019-07-23 15:32:35 -04:00
openssldh_link.c Various little fixes found by coccinelle 2019-10-01 16:48:55 +02:00
opensslecdsa_link.c Various little fixes found by coccinelle 2019-10-01 16:48:55 +02:00
openssleddsa_link.c Various little fixes found by coccinelle 2019-10-01 16:48:55 +02:00
opensslrsa_link.c Various little fixes found by coccinelle 2019-10-01 16:48:55 +02:00
order.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
peer.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
pkcs11.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
pkcs11ecdsa_link.c Cleanup stray goto labels from removing isc_mem_allocate/strdup checking blocks 2019-07-23 15:32:36 -04:00
pkcs11eddsa_link.c Use coccinelle to cleanup the failure handling blocks from isc_mem_strdup 2019-07-23 15:32:36 -04:00
pkcs11rsa_link.c Cleanup stray goto labels from removing isc_mem_allocate/strdup checking blocks 2019-07-23 15:32:36 -04:00
portlist.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
private.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
rbt.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
rbtdb.c Move the failure handling block closer to the only place where it could fail 2019-10-01 10:43:26 +10:00
rbtdb.h Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
rcode.c address or suppress cppcheck warnings 2019-09-12 17:59:28 +10:00
rdata.c Use coccinelle to cleanup the failure handling blocks from isc_mem_allocate 2019-07-23 15:32:35 -04:00
rdatalist.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
rdatalist_p.h Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
rdataset.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
rdatasetiter.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
rdataslab.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
request.c isc_event_allocate() cannot fail, remove the fail handling blocks 2019-08-30 08:55:34 +02:00
resolver.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
result.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
rootns.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
rpz.c Unify how we use isc_refcount_decrement() to destroy object 2019-09-13 12:44:49 +10:00
rriterator.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
rrl.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
sdb.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
sdlz.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
soa.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
spnego.asn1 Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
spnego.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
spnego.h Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
spnego_asn1.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
spnego_asn1.pl Remove $Id markers, Principal Author and Reviewed tags from the full source tree 2018-05-11 13:17:46 +02:00
ssu.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
ssu_external.c lib/dns/ssu_external.c: Use %zu for formatting sizeof() output 2019-10-01 16:24:29 +02:00
stats.c Move dnssec_keyid_max out rrsettype counters enum 2019-08-12 10:16:08 +02:00
tcpmsg.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
time.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
timer.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
tkey.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
tsec.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
tsig.c simplify dns_rbtnodechain_init() by removing unnecessary 'mctx' parameter 2019-08-29 10:03:36 -07:00
tsig_p.h Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
ttl.c address or suppress cppcheck warnings 2019-09-12 17:59:28 +10:00
update.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
validator.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
version.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
view.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
xfrin.c Remove blocks checking whether isc_mem_get() failed using the coccinelle 2019-07-23 15:32:35 -04:00
zone.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
zone_p.h Replace custom isc_boolean_t with C standard bool type 2018-08-08 09:37:30 +02:00
zonekey.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
zoneverify.c Replace RUNTIME_CHECK(dns_name_copy(..., NULL)) with dns_name_copynf() 2019-10-01 10:43:26 +10:00
zt.c simplify dns_rbtnodechain_init() by removing unnecessary 'mctx' parameter 2019-08-29 10:03:36 -07:00