]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Improve the definition of the DNS_GETDB_* flags
authorAram Sargsyan <aram@isc.org>
Wed, 31 Jan 2024 13:12:27 +0000 (13:12 +0000)
committerAram Sargsyan <aram@isc.org>
Fri, 2 Feb 2024 14:15:31 +0000 (14:15 +0000)
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.

lib/ns/query.c

index 01775033f52c59cb91b9d1be72d78aadf2535732..8017d04594407701da71f92bd5a78754cb545e80 100644 (file)
@@ -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)