aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-04 18:44:16 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-04 18:44:16 +0200
commit80e036560db0fa48e7b24476e6955f4b18c1e2ae (patch)
treed34e21d63429829d2273d362fddb60dd9923c321
parent3a708afe63beb666b9d8fe91b0d5eb7ebccb9f0c (diff)
sgsn_vty: Fix uninitialized variable in the gprs_apn2str method
This is fixing a GCC and Coverity warning: GCC: sgsn_vty.c: In function ‘vty_dump_pdp’: sgsn_vty.c:64:5: warning: ‘i’ may be used uninitialized in this function [-Wmaybe-uninitialized] sgsn_vty.c:49:15: note: ‘i’ was declared here Coverity: CID 1040706
-rw-r--r--openbsc/src/gprs/sgsn_vty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/gprs/sgsn_vty.c b/openbsc/src/gprs/sgsn_vty.c
index 1fc0b4110..848fa833f 100644
--- a/openbsc/src/gprs/sgsn_vty.c
+++ b/openbsc/src/gprs/sgsn_vty.c
@@ -46,7 +46,7 @@ static struct sgsn_config *g_cfg = NULL;
static char *gprs_apn2str(uint8_t *apn, unsigned int len)
{
static char apnbuf[GSM48_MAX_APN_LEN+1];
- unsigned int i;
+ unsigned int i = 0;
if (!apn)
return "";