Commit ede2208d authored by Ondřej Surý's avatar Ondřej Surý Committed by Ondřej Surý

ATOMIC_VAR_INIT() must be used only for static variables (C17)

parent c4aec790
...@@ -165,12 +165,14 @@ asyncload_zone(void **state) { ...@@ -165,12 +165,14 @@ asyncload_zone(void **state) {
dns_db_t *db = NULL; dns_db_t *db = NULL;
FILE* zonefile, *origfile; FILE* zonefile, *origfile;
char buf[4096]; char buf[4096];
atomic_bool done = ATOMIC_VAR_INIT(false); atomic_bool done;
int i = 0; int i = 0;
struct args args; struct args args;
UNUSED(state); UNUSED(state);
atomic_init(&done, false);
result = dns_test_makezone("foo", &zone, NULL, true); result = dns_test_makezone("foo", &zone, NULL, true);
assert_int_equal(result, ISC_R_SUCCESS); assert_int_equal(result, ISC_R_SUCCESS);
...@@ -266,12 +268,14 @@ asyncload_zt(void **state) { ...@@ -266,12 +268,14 @@ asyncload_zt(void **state) {
dns_view_t *view; dns_view_t *view;
dns_zt_t *zt = NULL; dns_zt_t *zt = NULL;
dns_db_t *db = NULL; dns_db_t *db = NULL;
atomic_bool done = ATOMIC_VAR_INIT(false); atomic_bool done;
int i = 0; int i = 0;
struct args args; struct args args;
UNUSED(state); UNUSED(state);
atomic_init(&done, false);
result = dns_test_makezone("foo", &zone1, NULL, true); result = dns_test_makezone("foo", &zone1, NULL, true);
assert_int_equal(result, ISC_R_SUCCESS); assert_int_equal(result, ISC_R_SUCCESS);
dns_zone_setfile(zone1, "testdata/zt/zone1.db", dns_zone_setfile(zone1, "testdata/zt/zone1.db",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment