]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
chg: dev: Enforce type checking for dns_dbversion_t
authorOndřej Surý <ondrej@isc.org>
Thu, 7 Nov 2024 07:23:02 +0000 (07:23 +0000)
committerOndřej Surý <ondrej@isc.org>
Thu, 7 Nov 2024 07:23:02 +0000 (07:23 +0000)
Originally, the dns_dbversion_t was typedef'ed to void type.  This
allowed some flexibility, but using (void *) just removes any
type-checking that C might have.  Instead of using:

    typedef void dns_dbversion_t;

use a trick to define the type to non-existing structure:

    typedef struct dns_dbversion dns_dbversion_t;

This allows the C compilers to employ the type-checking while the
structure itself doesn't have to be ever defined because the actual
'storage' is never accessed using dns_dbversion_t type.

Merge branch 'ondrej/non-void-dns_dbversion_t' into 'main'

See merge request isc-projects/bind9!9724


Trivial merge