From 1c33e4af051c1b38149bde13b5ee0248236a084b Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Tue, 5 Jan 2021 14:36:52 +0100 Subject: [PATCH] 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 --- src/gbproxy/gb_proxy_peer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gbproxy/gb_proxy_peer.c b/src/gbproxy/gb_proxy_peer.c index 94f9c03a6..863bcceb6 100644 --- a/src/gbproxy/gb_proxy_peer.c +++ b/src/gbproxy/gb_proxy_peer.c @@ -482,7 +482,7 @@ struct gbproxy_sgsn *gbproxy_sgsn_by_nri(struct gbproxy_config *cfg, uint16_t nr 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