]> git.proxmox.com Git - ovs.git/commit
lib/ovs-rcu: evaluate argument of ovsrcu_get only once.
authorJarno Rajahalme <jrajahalme@nicira.com>
Mon, 21 Jul 2014 21:19:06 +0000 (14:19 -0700)
committerJarno Rajahalme <jrajahalme@nicira.com>
Mon, 21 Jul 2014 21:19:06 +0000 (14:19 -0700)
commit2924cf52ca105415762dc2c8ea8ba30f88b63f89
tree1462f6672173da9520e88d7af1011b9fa501fc04
parentdb73f7166a6baecbf07e8bb19451fb033954c5f6
lib/ovs-rcu: evaluate argument of ovsrcu_get only once.

As ovsrcu_get() looks like a function call, it is reasonable for the
callers to expect that the arguments are evaluated only once.
CONST_CAST expands its 'POINTER' argument multiple times, and the
exact effect of this turned out to be compiler dependent.  Fix this by
expanding the macro argument before CONST_CAST, and removing
unnecessary CONST_CASTs.

VMware-BZ: #1287651

Signed-off-by: Jarno Rajahalme <jrajahalme@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/ovs-rcu.h