The offsetof(struct ovs_router_entry, cr) should always be 0,
thus the else statement should never be reached.

Signed-off-by: William Tu <[email protected]>
---
 lib/ovs-router.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ovs-router.c b/lib/ovs-router.c
index cd2ab15fb003..bc8616858a84 100644
--- a/lib/ovs-router.c
+++ b/lib/ovs-router.c
@@ -71,7 +71,7 @@ ovs_router_entry_cast(const struct cls_rule *cr)
     if (offsetof(struct ovs_router_entry, cr) == 0) {
         return CONTAINER_OF(cr, struct ovs_router_entry, cr);
     } else {
-        return cr ? CONTAINER_OF(cr, struct ovs_router_entry, cr) : NULL;
+        OVS_NOT_REACHED();
     }
 }
 
-- 
2.7.4

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to