From: Aram Sargsyan Date: Wed, 31 Jan 2024 13:12:27 +0000 (+0000) Subject: Improve the definition of the DNS_GETDB_* flags X-Git-Tag: v9.19.22~63^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0d7c7777da160ff0fc1fd2e4942826d8af50f1bf;p=thirdparty%2Fbind9.git Improve the definition of the DNS_GETDB_* flags Use the (1 << N) form for defining the flags, in order to avoid errors like the one fixed in the previous commit. Also convert the definitions to an enum, as done in some of our recent refactoring work. --- diff --git a/lib/ns/query.c b/lib/ns/query.c index 01775033f52..8017d045944 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -196,11 +196,13 @@ client_trace(ns_client_t *client, int level, const char *message) { #define CCTRACE(l, m) ((void)m) #endif /* WANT_QUERYTRACE */ -#define DNS_GETDB_NOEXACT 0x01U -#define DNS_GETDB_NOLOG 0x02U -#define DNS_GETDB_PARTIAL 0x04U -#define DNS_GETDB_IGNOREACL 0x08U -#define DNS_GETDB_STALEFIRST 0X10U +enum { + DNS_GETDB_NOEXACT = 1 << 0, + DNS_GETDB_NOLOG = 1 << 1, + DNS_GETDB_PARTIAL = 1 << 2, + DNS_GETDB_IGNOREACL = 1 << 3, + DNS_GETDB_STALEFIRST = 1 << 4, +}; #define PENDINGOK(x) (((x) & DNS_DBFIND_PENDINGOK) != 0)