]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Make CHECK() macro local by moving it from dnstest.h to respective .c files
authorOndřej Surý <ondrej@sury.org>
Tue, 18 Jun 2019 12:56:41 +0000 (14:56 +0200)
committerOndřej Surý <ondrej@sury.org>
Wed, 19 Jun 2019 11:51:01 +0000 (13:51 +0200)
The CHECK() macro has been defined both in dnstest.h and update.c
files.  This has created a conflict between macro definitions when
including both of the files in update_test.c.  While the CHECK() macro
is convenient for the tests, it has been really used in just two
files, so the MR moves them into those respective .c files.

lib/dns/tests/dnstest.c
lib/dns/tests/dnstest.h
lib/dns/tests/tsig_test.c

index 551094527212d9d0413419dce27a5f6a4ec2b360..d30780f461b824f951e3bc4b444bcd0dadd9938d 100644 (file)
 
 #include "dnstest.h"
 
+#define CHECK(r)                               \
+       do {                                    \
+               result = (r);                   \
+               if (result != ISC_R_SUCCESS) {  \
+                       goto cleanup;           \
+               }                               \
+       } while (0)
+
 isc_mem_t *mctx = NULL;
 isc_log_t *lctx = NULL;
 isc_taskmgr_t *taskmgr = NULL;
index 96022780ef456fe0735ccf1fc400fd0888cb42d1..cc485232c6abcd952f0304ea8ecbcc75d7f6e378 100644 (file)
 #include <dns/result.h>
 #include <dns/zone.h>
 
-#define CHECK(r) \
-       do { \
-               result = (r); \
-               if (result != ISC_R_SUCCESS) \
-                       goto cleanup; \
-       } while (0)
-
 typedef struct {
        dns_diffop_t op;
        const char *owner;
index df2ef474a4b36951a569509928f9492a4d417364..c1883ddcf87b2bcb79120ce64a8b5bd0ef0c390a 100644 (file)
 
 #include "dnstest.h"
 
+#define CHECK(r)                               \
+       do {                                    \
+               result = (r);                   \
+               if (result != ISC_R_SUCCESS) {  \
+                       goto cleanup;           \
+               }                               \
+       } while (0)
+
 #define TEST_ORIGIN    "test"
 
 static int