datapath-windows: Remove all duplicate checks for NULL.
authorSorin Vinturis <svinturis@cloudbasesolutions.com>
Fri, 14 Nov 2014 11:35:21 +0000 (11:35 +0000)
committerBen Pfaff <blp@nicira.com>
Fri, 14 Nov 2014 22:10:35 +0000 (14:10 -0800)
commitd07ac93e1e154b8a5c031ed2bad97ca8b95d7fc4
treef72ee5986378febf4d3215e39661c87a70681674
parent12c148380a8b8e1bd2939ed1b7227f1d88313103
datapath-windows: Remove all duplicate checks for NULL.

Right now the gOvsSwitchContext pointer is checked against NULL
in a lot of places of the OVS extension code. This check should
be done only once to avoid wasteful checks. Thus I have added the
check in the dispatch routine, before doing any processing, and
removed all other checks from the rest of the code.

Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Acked-by: Eitan Eliahu <eliahue@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows/ovsext/Datapath.c
datapath-windows/ovsext/Flow.c
datapath-windows/ovsext/User.c
datapath-windows/ovsext/Vport.c