sgw: gwContainer can't be null here
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 24 Feb 2015 15:43:56 +0000 (16:43 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 24 Feb 2015 15:44:13 +0000 (16:44 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/gateway.c

index 4c4b5a7..99df6fd 100644 (file)
@@ -1550,7 +1550,11 @@ static bool determineBestOverallLink(enum sgw_multi_change_phase phase) {
     bestOverallLink.link.egress = bestEgressLink;
     bestOverallLink.olsrTunnelIfIndex = 0;
   } else {
-    struct olsr_iptunnel_entry * tunnel = !gwContainer ? NULL : gwContainer->tunnel;
+    struct olsr_iptunnel_entry * tunnel;
+
+    assert(!gwContainer);
+
+    tunnel = gwContainer->tunnel;
 
     bestOverallLink.valid = olsrGw;
     bestOverallLink.isOlsr = true;