Skip to content

Commit a42fa55

Browse files
committed
jsoninfo: remove some dead code
Coverity: CID 739629 (#1 of 1): Logically dead code (DEADCODE) Execution cannot reach this expression ""auto"" inside statement "v4 = (autoV4 ? "auto" : "s");". CID 739630 (#1 of 1): Logically dead code (DEADCODE) Execution cannot reach this expression ""auto"" inside statement "v6 = (autoV6 ? "auto" : "s");". Signed-off-by: Ferry Huberts <[email protected]>
1 parent e069614 commit a42fa55

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/jsoninfo/src/olsrd_jsoninfo.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -776,14 +776,14 @@ ipc_print_gateways(struct autobuf *abuf)
776776
}
777777

778778
if (gw == olsr_get_inet_gateway(false)) {
779-
v4 = autoV4 ? "auto" : "s";
779+
v4 = "s";
780780
} else if (gw->ipv4 && (olsr_cnf->ip_version == AF_INET || olsr_cnf->use_niit)
781781
&& (olsr_cnf->smart_gw_allow_nat || !gw->ipv4nat)) {
782782
v4 = "u";
783783
}
784784

785785
if (gw == olsr_get_inet_gateway(true)) {
786-
v6 = autoV6 ? "auto" : "s";
786+
v6 = "s";
787787
} else if (gw->ipv6 && olsr_cnf->ip_version == AF_INET6) {
788788
v6 = "u";
789789
}

0 commit comments

Comments
 (0)