summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-12 15:45:41 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-12-12 16:20:12 +0100
commit7f180e83c378107e791ceabaf44aa9fc29dd4bfe (patch)
tree1609c7e436b93e27989fcccf6d65fddf7e9d900d
parenta5ddf489e1b085e573e4dbcb24e40a02cba413f7 (diff)
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
-rw-r--r--openbsc/src/libbsc/bsc_vty.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index b03498168..e0ccfafb6 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -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,