pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-sigtran/+/43950?usp=email )
Change subject: vty: Fix wrong return check in routing-key command ......................................................................
vty: Fix wrong return check in routing-key command
The function ss7_as_routing_key_create_route() returns a route pointer, not a return code.
Related: Coverity CID#565013 Change-Id: I39a8f11a9c39819c8bf180a69cc7cb26b0fb21f4 --- M src/ss7_as_vty.c 1 file changed, 1 insertion(+), 1 deletion(-)
Approvals: Jenkins Builder: Verified osmith: Looks good to me, approved
diff --git a/src/ss7_as_vty.c b/src/ss7_as_vty.c index 6197093..ff533bb 100644 --- a/src/ss7_as_vty.c +++ b/src/ss7_as_vty.c @@ -461,7 +461,7 @@ rkey->ssn = ssn;
/* Add fully qualified route for routing-key: */ - if (ss7_as_routing_key_create_route(as) < 0) { + if (!ss7_as_routing_key_create_route(as)) { vty_out(vty, "Failed adding dynamic match-routing-key route for AS %s!%s", as->cfg.name, VTY_NEWLINE); return CMD_WARNING;