On Mon, Apr 11, 2016 at 9:48 PM, Ben Pfaff <b...@ovn.org> wrote:

> The new helpers get_local_datapath() and get_patched_datapath() make code
> a little shorter and easier to read.  They also avoid a pitfall that was
> present in at least a few of the instances: CONTAINER_OF is not safe on a
> null pointer, because it does a raw pointer subtraction and will change
> NULL to something else.  This wasn't actually a problem in these particular
> cases because the value it was subtracting was zero (although arguably it
> is still undefined behavior because the compiler is allowed to assume that
> a pointer on which arithmetic is performed is nonnull).
>
> Signed-off-by: Ben Pfaff <b...@ovn.org>
>

Acked-by: Russell Bryant <russ...@ovn.org>


-- 
Russell Bryant
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to