node->sw->fdb[to] is uint8_t. So, (node->sw->fdb[to] < 0) is always false. Issue was detected by Coverity. Signed-off-by: Honggang Li <honli@xxxxxxxxxx> --- ibsim/sim_cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ibsim/sim_cmd.c b/ibsim/sim_cmd.c index e2fe6ba6dddb..1d36c600814f 100644 --- a/ibsim/sim_cmd.c +++ b/ibsim/sim_cmd.c @@ -751,8 +751,8 @@ static int dump_route(FILE * f, char *line) break; // found outport = portnum; if (node->type == SWITCH_NODE) { - if ((outport = node->sw->fdb[to]) < 0 - || to > node->sw->linearFDBtop) + outport = node->sw->fdb[to]; + if (to > node->sw->linearFDBtop) goto badtbl; port = ports + node->portsbase + outport; if (outport == 0) { -- 2.15.0-rc1