Commit 28f13b34 authored by Steffen Vogel's avatar Steffen Vogel 🎅🏼
Browse files

refactor: NULL -> nullptr

parent 028b83d9
......@@ -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);
......
......@@ -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);
}
......@@ -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);
......
......@@ -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);
......
......@@ -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.");
......
Supports Markdown
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