summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2023-01-27 09:47:24 +0100
committerDavid Tardon <dtardon@redhat.com>2023-04-21 16:29:15 +0200
commit39dcab9062328227fb796a1316c62767eae53805 (patch)
treeb7a2ef63b4c67b8eb612be1a0503e02c17a7fc2d /src/test
parentMerge pull request #27349 from mrc0mmand/codespell (diff)
downloadsystemd-39dcab9062328227fb796a1316c62767eae53805.tar.xz
systemd-39dcab9062328227fb796a1316c62767eae53805.zip
test: shorten a bit
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-bitmap.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/test/test-bitmap.c b/src/test/test-bitmap.c
index 655b823c7f..6a84508b12 100644
--- a/src/test/test-bitmap.c
+++ b/src/test/test-bitmap.c
@@ -10,8 +10,7 @@ int main(int argc, const char *argv[]) {
assert_se(b);
assert_se(bitmap_ensure_allocated(&b) == 0);
- bitmap_free(b);
- b = NULL;
+ b = bitmap_free(b);
assert_se(bitmap_ensure_allocated(&b) == 0);
assert_se(bitmap_isset(b, 0) == false);
@@ -89,13 +88,11 @@ int main(int argc, const char *argv[]) {
bitmap_clear(b);
assert_se(bitmap_isclear(b) == true);
assert_se(bitmap_equal(b, b2) == false);
- bitmap_free(b2);
- b2 = NULL;
+ b2 = bitmap_free(b2);
assert_se(bitmap_set(b, UINT_MAX) == -ERANGE);
- bitmap_free(b);
- b = NULL;
+ b = bitmap_free(b);
assert_se(bitmap_ensure_allocated(&b) == 0);
assert_se(bitmap_ensure_allocated(&b2) == 0);