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:47:00 +0000 (18:47 +0100)
commit842f5c90d7f3c4cec72c4dc35ac4be093d8b8963
tree5970b7b39461fa7cdad34586d0e9ead75b47b6d8
parent26cb9d81e0dff472f3da338ab8b2de1cd77676a7
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.025403 seconds and 4 git commands to generate.