bsc/msc: Extension can never be NULL use strlen instead

Fixes: Coverity CID 1040717
This commit is contained in:
Holger Hans Peter Freyther 2014-04-04 11:53:18 +02:00
parent cb4567f117
commit bd30cd3e1f
2 changed files with 2 additions and 2 deletions

View File

@ -890,7 +890,7 @@ static void subscr_dump_vty(struct vty *vty, struct gsm_subscriber *subscr)
subscr->authorized, VTY_NEWLINE);
if (strlen(subscr->name))
vty_out(vty, " Name: '%s'%s", subscr->name, VTY_NEWLINE);
if (subscr->extension)
if (strlen(subscr->extension))
vty_out(vty, " Extension: %s%s", subscr->extension,
VTY_NEWLINE);
vty_out(vty, " IMSI: %s%s", subscr->imsi, VTY_NEWLINE);

View File

@ -62,7 +62,7 @@ static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr,
subscr->authorized, VTY_NEWLINE);
if (strlen(subscr->name))
vty_out(vty, " Name: '%s'%s", subscr->name, VTY_NEWLINE);
if (subscr->extension)
if (strlen(subscr->extension))
vty_out(vty, " Extension: %s%s", subscr->extension,
VTY_NEWLINE);
vty_out(vty, " LAC: %d/0x%x%s",