]> git.ipfire.org Git - thirdparty/systemd.git/commit
test-alloc-util: add casts to bools from p ointers 9261/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 13 Jun 2018 08:34:30 +0000 (10:34 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 13 Jun 2018 08:52:40 +0000 (10:52 +0200)
commit108ccae9e193971982d242929d7dc069d780a01e
tree6b3c9cdee3fbdbc8a20e70497f3d3f472815833d
parent5d904a6aaaceae7fe2f11d6b848b0dd45e3fd1c4
test-alloc-util: add casts to bools from p ointers

C++03: "An rvalue of arithmetic, enumeration, pointer, or pointer to member
type can be converted to an rvalue of type bool. A zero value, null pointer
value, or null member pointer value is converted to false; any other value is
converted to true"

C should behave the same because pointers are scalars in C, but let's verify
that.
src/test/test-alloc-util.c