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

Remove use of the inline keyword used as suggestion to compiler

Historically, the inline keyword was a strong suggestion to the compiler
that it should inline the function marked inline.  As compilers became
better at optimising, this functionality has receded, and using inline
as a suggestion to inline a function is obsolete.  The compiler will
happily ignore it and inline something else entirely if it finds that's
a better optimisation.

Therefore, remove all the occurences of the inline keyword with static
functions inside single compilation unit and leave the decision whether
to inline a function or not entirely on the compiler

NOTE: We keep the usage the inline keyword when the purpose is to change
the linkage behaviour.
This commit is contained in:
Ondřej Surý
2021-10-11 13:43:12 +02:00
committed by Ondřej Surý
parent 04d0b70ba2
commit 20f0936cf2
151 changed files with 1485 additions and 1488 deletions

View File

@@ -410,7 +410,7 @@ dns_rdataslab_count(unsigned char *slab, unsigned int reservelen) {
* 'type' and class 'rdclass', and advance '*current' to
* point to the next item in the slab.
*/
static inline void
static void
rdata_from_slab(unsigned char **current, dns_rdataclass_t rdclass,
dns_rdatatype_t type, dns_rdata_t *rdata) {
unsigned char *tcurrent = *current;
@@ -446,7 +446,7 @@ rdata_from_slab(unsigned char **current, dns_rdataclass_t rdclass,
* contains an rdata identical to 'rdata'. This does case insensitive
* comparisons per DNSSEC.
*/
static inline bool
static bool
rdata_in_slab(unsigned char *slab, unsigned int reservelen,
dns_rdataclass_t rdclass, dns_rdatatype_t type,
dns_rdata_t *rdata) {