Fix undefined NULL pointer arithmetic in hlist
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 3 Dec 2013 16:31:16 +0000 (17:31 +0100)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 3 Dec 2013 16:31:16 +0000 (17:31 +0100)
commitdb903109f0031c831e8fdc95cb7197996e53f46d
tree2b013f33e15f09db2ddad0a43806171959a2ff5d
parent0e1efa0e8c7961fc3eca21d0268c07f44eb572e5
Fix undefined NULL pointer arithmetic in hlist

Clang 3.3 with -O2 optimisations is especially picky about arithmetic on
NULL pointers. This undefined behavior is turned into optimized out NULL
checks by clang 3.3. Fix the undefined behavior by checking against the
pointer directly, without going back and forth around NULL with
pointer arithmetic.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu/hlist.h
This page took 0.025456 seconds and 4 git commands to generate.