aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-10-07 00:57:22 +0200
committerAlexander Couzens <lynxis@fe80.eu>2020-10-07 00:58:54 +0200
commitc58a384c75fbe3b5d2c73e212e96a605a5ee1221 (patch)
treeb50682ae6ab6316db1ae19caa056266e3e575507 /src
parentc47d80a89b1f08dcab133dbf5a7644ad5847f734 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/osmo-bsc/bsc_vty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index dec827763..7be6aebd3 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -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);
}