Previously, the function(s) in the commit subject could fail for various
reasons - mostly allocation failures, or other functions returning
different return code than ISC_R_SUCCESS. Now, the aforementioned
function(s) cannot ever fail and they would always return ISC_R_SUCCESS.
Change the function(s) to return void and remove the extra checks in
the code that uses them.
This commit converts the license handling to adhere to the REUSE
specification. It specifically:
1. Adds used licnses to LICENSES/ directory
2. Add "isc" template for adding the copyright boilerplate
3. Changes all source files to include copyright and SPDX license
header, this includes all the C sources, documentation, zone files,
configuration files. There are notes in the doc/dev/copyrights file
on how to add correct headers to the new files.
4. Handle the rest that can't be modified via .reuse/dep5 file. The
binary (or otherwise unmodifiable) files could have license places
next to them in <foo>.license file, but this would lead to cluttered
repository and most of the files handled in the .reuse/dep5 file are
system test files.
Also disable the semantic patch as the code needs tweaks here and there because
some destroy functions might not destroy the object and return early if the
object is still in use.
invariant, causing timer events not to be posted
when due.
Specifically, isc_heap_delete() moved the last element of the heap to
the vacated position and then attempted to restore the heap invariant
by calling sink_down(). This works when the last element has a lower
priority than the one being deleted, and this is often the case
because the last element tends to have a low priority. However, it is
not guaranteed to be the lowest. When deleting an item of a lower
priority than the last item, restoring the invariant requires a call
to float_up(), not sink_down().
isc_heap_delete_now calls either float_up() or sink_down() as needed,
and INSISTs have been added to verify that the heap invariant indeed
holds after the calls.
Cleanup of redundant/useless header file inclusion.
ISC style lint, primarily for function declarations and standalone
comments -- ie, those that appear on a line without any code, which
should be written as follows:
/*
* This is a comment.
*/