diff --git a/common/tests/advio.cpp b/common/tests/advio.cpp index f0364c765..9d1458973 100644 --- a/common/tests/advio.cpp +++ b/common/tests/advio.cpp @@ -53,7 +53,7 @@ Test(advio, local) { AFILE *af; int ret; - char *buf = NULL; + char *buf = nullptr; size_t buflen = 0; /* We open this file and check the first line */ @@ -119,7 +119,7 @@ Test(advio, resume) AFILE *af1, *af2; char *fn, dir[] = "/tmp/temp.XXXXXX"; char line1[32]; - char *line2 = NULL; + char *line2 = nullptr; size_t linelen = 0; retp = mkdtemp(dir); diff --git a/common/tests/hash_table.cpp b/common/tests/hash_table.cpp index c83939d43..0d163b12c 100644 --- a/common/tests/hash_table.cpp +++ b/common/tests/hash_table.cpp @@ -69,6 +69,6 @@ Test(hash_table, hash_table_lookup) ret = hash_table_insert(&ht, keys[0], (void *) values[0]); cr_assert(!ret); - ret = hash_table_destroy(&ht, NULL, false); + ret = hash_table_destroy(&ht, nullptr, false); cr_assert(!ret); } diff --git a/common/tests/json_buffer.cpp b/common/tests/json_buffer.cpp index c7d54147b..a24b1fc2a 100644 --- a/common/tests/json_buffer.cpp +++ b/common/tests/json_buffer.cpp @@ -45,7 +45,7 @@ Test(json_buffer, decode) buf.insert(buf.begin(), e, e+len); - k = json_loads(e, 0, NULL); + k = json_loads(e, 0, nullptr); cr_assert_not_null(k); j = buf.decode(); @@ -61,7 +61,7 @@ Test(json_buffer, encode) const char *e = "{\"id\": \"5a786626-fbc6-4c04-98c2-48027e68c2fa\"}"; - k = json_loads(e, 0, NULL); + k = json_loads(e, 0, nullptr); cr_assert_not_null(k); ret = buf.encode(k); @@ -84,7 +84,7 @@ Test(json_buffer, encode_decode) const char *e = "{\"id\": \"5a786626-fbc6-4c04-98c2-48027e68c2fa\"}"; - k = json_loads(e, 0, NULL); + k = json_loads(e, 0, nullptr); cr_assert_not_null(k); ret = buf.encode(k); diff --git a/common/tests/list.cpp b/common/tests/list.cpp index 97c2a0717..5e430ccc0 100644 --- a/common/tests/list.cpp +++ b/common/tests/list.cpp @@ -56,7 +56,7 @@ Test(list, list_lookup) cr_assert_eq(found->data, 13); - list_destroy(&l, NULL, true); + list_destroy(&l, nullptr, true); } Test(list, list_search) @@ -84,7 +84,7 @@ Test(list, list_search) char *not_found = (char *) list_search(&l, (cmp_cb_t) strcmp, negative); cr_assert_null(not_found); - list_destroy(&l, NULL, false); + list_destroy(&l, nullptr, false); } struct content { @@ -137,7 +137,7 @@ Test(list, basics) list_push(&l, (void *) i); } - cr_assert_eq(list_at_safe(&l, 555), NULL); + cr_assert_eq(list_at_safe(&l, 555), nullptr); cr_assert_eq(list_last(&l), (void *) 99); cr_assert_eq(list_first(&l), (void *) 0); @@ -164,7 +164,7 @@ Test(list, basics) ret = list_contains(&l, (void *) 55); cr_assert(!ret); - list_destroy(&l, NULL, false); + list_destroy(&l, nullptr, false); ret = list_length(&l); cr_assert_eq(ret, -1, "List not properly destroyed: l.length = %zd", l.length); diff --git a/common/tests/utils.cpp b/common/tests/utils.cpp index d7a09708a..dca95246d 100644 --- a/common/tests/utils.cpp +++ b/common/tests/utils.cpp @@ -134,7 +134,7 @@ Test(utils, is_pow2) Test(utils, strf) { - char *buf = NULL; + char *buf = nullptr; buf = strcatf(&buf, "Hallo %s", "Steffen."); cr_assert_str_eq(buf, "Hallo Steffen.");