chiark / gitweb /
tree-wide: drop 'This file is part of systemd' blurb
[elogind.git] / src / test / test-alloc-util.c
index 324f786c37149af129dfa083b381faa02ffab7d1..d38416a361a1f29191756063ddd5b830e558b482 100644 (file)
@@ -1,7 +1,5 @@
 /* SPDX-License-Identifier: LGPL-2.1+ */
 /***
-  This file is part of systemd.
-
   Copyright 2010 Lennart Poettering
 ***/
 
@@ -58,19 +56,23 @@ static void test_memdup_multiply_and_greedy_realloc(void) {
 }
 
 static void test_bool_assign(void) {
-        bool b, c, *cp = &c, d, e, f;
+        bool b, c, *cp = &c, d, e, f, g, h;
 
         b = 123;
         *cp = -11;
         d = 0xF & 0xFF;
         e = b & d;
         f = 0x0;
+        g = cp;    /* cast from pointer */
+        h = NULL;  /* cast from pointer */
 
         assert(b);
         assert(c);
         assert(d);
         assert(e);
         assert(!f);
+        assert(g);
+        assert(!h);
 }
 
 int main(int argc, char *argv[]) {