1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

refactor: NULL -> nullptr

This commit is contained in:
Steffen Vogel 2018-10-19 14:34:17 +02:00
parent 39bbbca283
commit 591cfd5a03
5 changed files with 11 additions and 11 deletions

View file

@ -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);

View file

@ -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);
}

View file

@ -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);

View file

@ -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);

View file

@ -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.");