Change in osmo-sgsn[master]: gb_proxy_peer: sgsn can never be NULL in gbproxy_sgsn_by_nri()

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/.

laforge gerrit-no-reply at lists.osmocom.org
Tue Jan 5 14:16:23 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-sgsn/+/21946 )

Change subject: gb_proxy_peer: sgsn can never be NULL in gbproxy_sgsn_by_nri()
......................................................................

gb_proxy_peer: sgsn can never be NULL in gbproxy_sgsn_by_nri()

Redundant check makes Coverity think that sgsn can be NULL...

Change-Id: Iffdeb18e0a5575a2a09129eed9b8a41c3340dcbf
Fixes: CID#215870
---
M src/gbproxy/gb_proxy_peer.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/gbproxy/gb_proxy_peer.c b/src/gbproxy/gb_proxy_peer.c
index 94f9c03..863bcce 100644
--- a/src/gbproxy/gb_proxy_peer.c
+++ b/src/gbproxy/gb_proxy_peer.c
@@ -482,7 +482,7 @@
 	llist_for_each_entry(sgsn, &cfg->sgsns, list) {
 		if (osmo_nri_v_matches_ranges(nri, sgsn->pool.nri_ranges)) {
 			/* Also check if the NRI we're looking for is a NULL NRI */
-			if (sgsn && null_nri) {
+			if (null_nri) {
 				if (osmo_nri_v_matches_ranges(nri, cfg->pool.null_nri_ranges))
 					*null_nri = true;
 				else

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

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Iffdeb18e0a5575a2a09129eed9b8a41c3340dcbf
Gerrit-Change-Number: 21946
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210105/fd79f1b1/attachment.htm>


More information about the gerrit-log mailing list