aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmsc
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-02-23 16:16:44 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-02-28 00:14:15 +0700
commit4d75877e61f13e80701b8436a5d71aa868f0d295 (patch)
treed2c3b935e154c61561d3c43fa6f647ab54f4b9b9 /src/libmsc
parente9ef7c6b9a9c9b062c5acd69de69bff65856ab3c (diff)
libmsc/sgs_vty.c: always write server address and VLR name
Comparing an array to null is not useful, because the expression will always evaluate as true. Let's just always write SGs server address and VLR name, no mater whether default values are used or not, same as we do for the HLR address and port. Change-Id: If045e42fca0315b0777eb86c44bf934ce58b340b Fixes: CID#190871 Array compared against 0 (NO_EFFECT)
Diffstat (limited to 'src/libmsc')
-rw-r--r--src/libmsc/sgs_vty.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/libmsc/sgs_vty.c b/src/libmsc/sgs_vty.c
index 5b26178d6..8c94301fd 100644
--- a/src/libmsc/sgs_vty.c
+++ b/src/libmsc/sgs_vty.c
@@ -158,12 +158,9 @@ static int config_write_sgs(struct vty *vty)
char str_buf[256];
vty_out(vty, "sgs%s", VTY_NEWLINE);
- if (sgs->cfg.local_port != SGS_PORT_DEFAULT)
- vty_out(vty, " local-port %u%s", sgs->cfg.local_port, VTY_NEWLINE);
- if (sgs->cfg.local_addr)
- vty_out(vty, " local-ip %s%s", sgs->cfg.local_addr, VTY_NEWLINE);
- if (sgs->cfg.vlr_name)
- vty_out(vty, " vlr-name %s%s", sgs->cfg.vlr_name, VTY_NEWLINE);
+ vty_out(vty, " local-port %u%s", sgs->cfg.local_port, VTY_NEWLINE);
+ vty_out(vty, " local-ip %s%s", sgs->cfg.local_addr, VTY_NEWLINE);
+ vty_out(vty, " vlr-name %s%s", sgs->cfg.vlr_name, VTY_NEWLINE);
for (i = 0; i < ARRAY_SIZE(sgs->cfg.timer); i++) {
if (sgs->cfg.timer[i] == sgs_state_timer_defaults[i])