summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-14 08:38:24 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-14 09:04:50 +0200
commit5ccd015371ba013f37e474b9e9f23b845fd17f43 (patch)
treefa90324a3f0d9b05aaaabeb2f601670bdeb3c68b
parent995ff35f3913b7e755a0bd1425c3b5bc8d966354 (diff)
nitb: The subscr->imsi is an array will never be NULL
Array compared against 0 (NO_EFFECT) array_null: Comparing an array to null is not useful: "subscr->imsi" Fixes: Coverity CID 1040716
-rw-r--r--openbsc/src/libbsc/bsc_vty.c3
-rw-r--r--openbsc/src/libmsc/vty_interface_layer3.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 6c58ff1..b2b7977 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -841,8 +841,7 @@ static void subscr_dump_vty(struct vty *vty, struct gsm_subscriber *subscr)
if (subscr->extension)
vty_out(vty, " Extension: %s%s", subscr->extension,
VTY_NEWLINE);
- if (subscr->imsi)
- vty_out(vty, " IMSI: %s%s", subscr->imsi, VTY_NEWLINE);
+ vty_out(vty, " IMSI: %s%s", subscr->imsi, VTY_NEWLINE);
if (subscr->tmsi != GSM_RESERVED_TMSI)
vty_out(vty, " TMSI: %08X%s", subscr->tmsi,
VTY_NEWLINE);
diff --git a/openbsc/src/libmsc/vty_interface_layer3.c b/openbsc/src/libmsc/vty_interface_layer3.c
index 6b83275..393844e 100644
--- a/openbsc/src/libmsc/vty_interface_layer3.c
+++ b/openbsc/src/libmsc/vty_interface_layer3.c
@@ -65,8 +65,7 @@ static void subscr_dump_full_vty(struct vty *vty, struct gsm_subscriber *subscr,
VTY_NEWLINE);
vty_out(vty, " LAC: %d/0x%x%s",
subscr->lac, subscr->lac, VTY_NEWLINE);
- if (subscr->imsi)
- vty_out(vty, " IMSI: %s%s", subscr->imsi, VTY_NEWLINE);
+ vty_out(vty, " IMSI: %s%s", subscr->imsi, VTY_NEWLINE);
if (subscr->tmsi != GSM_RESERVED_TMSI)
vty_out(vty, " TMSI: %08X%s", subscr->tmsi,
VTY_NEWLINE);