chiark / gitweb /
test-alloc-util: add casts to bools from p ointers
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 13 Jun 2018 08:34:30 +0000 (10:34 +0200)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
commit1816567a45928b1022db20bdc00db66b9717a83f
tree45e623bea80d520848074cb467b302699e5793ee
parentd9537fde9944a03f48054e0f4b6a9aea7d3c2a9d
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