bsc_vty: parse the return code to make coverity happy

The missing return code isn't a problem atm because remote.af is checked
and remote.af is only set when osmo_Sockaddr_str_from_sockaddr() returns success.
However check the return code to be safe also in the future.

Found-by: Coverity
Fixes: CID#214863
Change-Id: I621360cab1e12c22248e33d62a9929995053ce04
This commit is contained in:
Alexander Couzens 2020-10-07 00:57:22 +02:00
parent c47d80a89b
commit c58a384c75
1 changed files with 2 additions and 2 deletions

View File

@ -773,8 +773,8 @@ static void config_write_bts_gprs(struct vty *vty, struct gsm_bts *bts)
vty_out(vty, " gprs nsvc %u local udp port %u%s", i,
nsvc->local_port, VTY_NEWLINE);
osmo_sockaddr_str_from_sockaddr(&remote, &nsvc->remote.u.sas);
if (remote.af != AF_UNSPEC) {
if (osmo_sockaddr_str_from_sockaddr(&remote, &nsvc->remote.u.sas) ||
remote.af != AF_UNSPEC) {
vty_out(vty, " gprs nsvc %u remote ip %s%s", i,
remote.ip, VTY_NEWLINE);
}