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
This commit is contained in:
Holger Hans Peter Freyther 2013-07-04 18:44:16 +02:00
parent 3a708afe63
commit 80e036560d
1 changed files with 1 additions and 1 deletions

View File

@ -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 "";