vty: Address coverity issue with subscr->name never being NULL
Coverity points out that subscr->name is an array and never NULL. Use strlen instead in this check. Fixes: Coverity CID 1040717
This commit is contained in:
parent
3d5290b136
commit
7d552fc8da
|
@ -873,7 +873,7 @@ static void subscr_dump_vty(struct vty *vty, struct gsm_subscriber *subscr)
|
|||
{
|
||||
vty_out(vty, " ID: %llu, Authorized: %d%s", subscr->id,
|
||||
subscr->authorized, VTY_NEWLINE);
|
||||
if (subscr->name)
|
||||
if (strlen(subscr->name))
|
||||
vty_out(vty, " Name: '%s'%s", subscr->name, VTY_NEWLINE);
|
||||
if (subscr->extension)
|
||||
vty_out(vty, " Extension: %s%s", subscr->extension,
|
||||
|
|
Loading…
Reference in New Issue