From: David Tardon Date: Fri, 27 Jan 2023 08:47:24 +0000 (+0100) Subject: test: shorten a bit X-Git-Tag: v254-rc1~651^2~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=39dcab9062328227fb796a1316c62767eae53805;p=thirdparty%2Fsystemd.git test: shorten a bit --- diff --git a/src/test/test-bitmap.c b/src/test/test-bitmap.c index 655b823c7fb..6a84508b12d 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);