Fix undefined NULL pointer arithmetic
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 28 Nov 2013 17:41:13 +0000 (18:41 +0100)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 28 Nov 2013 17:41:13 +0000 (18:41 +0100)
commit92af1a30ca6a70945b167c31631c8598a626c71a
treee71d1444a9535acc53bf62bb70a2d332fc812a2f
parente1c0b55cbcc602bdff8b9778d911c35515f48cc3
Fix undefined NULL pointer arithmetic

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.

Reported-by: Zifei Tong <soariez@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
urcu/rculfhash.h
This page took 0.034305 seconds and 4 git commands to generate.