Change in osmo-bsc[master]: bsc_vty: parse the return code to make coverity happy

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

lynxis lazus gerrit-no-reply at lists.osmocom.org
Tue Oct 6 22:59:04 UTC 2020


lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/20469 )


Change subject: bsc_vty: parse the return code to make coverity happy
......................................................................

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
---
M src/osmo-bsc/bsc_vty.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/69/20469/1

diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index dec8277..7be6aeb 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -773,8 +773,8 @@
 		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);
 		}

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/20469
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I621360cab1e12c22248e33d62a9929995053ce04
Gerrit-Change-Number: 20469
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201006/38ba0160/attachment.htm>


More information about the gerrit-log mailing list