aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-04-04 11:55:21 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-04-04 11:55:21 +0200
commitd219507d6373d49ba8e172a19540ad3f559c4088 (patch)
tree9b7f66c1313a77f9cafcfebcc14f799ee29d00eb
parentbd30cd3e1f47bffb966d3e4ccfc69d91661d65fe (diff)
sgsn: Comparing array to NULL is not useful
.v is a unsigned char array with up-to 255 elements. We do not need to add a null check here. Fixes: Coverity CID 1040719
-rw-r--r--openbsc/src/gprs/gprs_gmm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gprs_gmm.c b/openbsc/src/gprs/gprs_gmm.c
index f7a5cde00..6ba385558 100644
--- a/openbsc/src/gprs/gprs_gmm.c
+++ b/openbsc/src/gprs/gprs_gmm.c
@@ -1221,7 +1221,7 @@ int gsm48_tx_gsm_act_pdp_acc(struct sgsn_pdp_ctx *pdp)
pdp->lib->eua.v[0] |= 0xf0;
/* Optional: Protocol configuration options (FIXME: why 'req') */
- if (pdp->lib->pco_req.l && pdp->lib->pco_req.v)
+ if (pdp->lib->pco_req.l)
msgb_tlv_put(msg, GSM48_IE_GSM_PROTO_CONF_OPT,
pdp->lib->pco_req.l, pdp->lib->pco_req.v);