]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
ATOMIC_VAR_INIT() must be used only for static variables (C17)
authorOndřej Surý <ondrej@isc.org>
Mon, 13 Jan 2020 10:38:43 +0000 (11:38 +0100)
committerOndřej Surý <ondrej@sury.org>
Tue, 14 Jan 2020 12:12:13 +0000 (13:12 +0100)
lib/dns/tests/zt_test.c

index 77d36a94f2b77e94ee99c96ccd3d01a0516441c0..b534b4190d869a6e5f87196e707148faececbb07 100644 (file)
@@ -165,12 +165,14 @@ asyncload_zone(void **state) {
        dns_db_t *db = NULL;
        FILE* zonefile, *origfile;
        char buf[4096];
-       atomic_bool done = ATOMIC_VAR_INIT(false);
+       atomic_bool done;
        int i = 0;
        struct args args;
 
        UNUSED(state);
 
+       atomic_init(&done, false);
+
        result = dns_test_makezone("foo", &zone, NULL, true);
        assert_int_equal(result, ISC_R_SUCCESS);
 
@@ -266,12 +268,14 @@ asyncload_zt(void **state) {
        dns_view_t *view;
        dns_zt_t *zt = NULL;
        dns_db_t *db = NULL;
-       atomic_bool done = ATOMIC_VAR_INIT(false);
+       atomic_bool done;
        int i = 0;
        struct args args;
 
        UNUSED(state);
 
+       atomic_init(&done, false);
+
        result = dns_test_makezone("foo", &zone1, NULL, true);
        assert_int_equal(result, ISC_R_SUCCESS);
        dns_zone_setfile(zone1, "testdata/zt/zone1.db",