sgw: remove some dead code left over in the previous commit
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 7 Apr 2016 17:38:35 +0000 (19:38 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 7 Apr 2016 18:12:48 +0000 (20:12 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
src/gateway.c

index ff44446..506c84e 100644 (file)
@@ -2179,7 +2179,7 @@ static void writeProgramStatusFile(enum sgw_multi_change_phase phase) {
         const char * originator = olsr_ip_to_string(&originatorStr, &gw->originator);
         struct ipaddr_str prefixIpStr;
         const char * prefixIPStr = olsr_ip_to_string(&prefixIpStr, &gw->external_prefix.prefix);
-        uint8_t prefix_len = !gw ? 0 : gw->external_prefix.prefix_len;
+        uint8_t prefix_len = gw->external_prefix.prefix_len;
         struct ipaddr_str tunnelGwStr;
         const char * tunnelGw = olsr_ip_to_string(&tunnelGwStr, &gw->originator);
         bool selected = bestOverallLink.valid && bestOverallLink.isOlsr && current_gw && (current_gw == gw);