aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-03-26 21:35:11 +0100
committerHarald Welte <laforge@gnumonks.org>2016-03-27 10:48:14 +0200
commit56ea30ff3f9f98a4903d060196b185ce124d7eaa (patch)
tree99e4aaa64a9c6e851d196eab4aa20e2a506df811 /openbsc
parent3ad0346f00c4d135f7d4d15017ce2941e13e2c54 (diff)
osmo-bsc: fix compiler warning: store struct in vty->index
Don't store an MSC index number in the vty->index void* value. Instead, store the osmo_msc_data struct directly. Thus avoid warnings about differences in int vs void* sizes, and save some index lookups.
Diffstat (limited to 'openbsc')
-rw-r--r--openbsc/src/osmo-bsc/osmo_bsc_vty.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsc/src/osmo-bsc/osmo_bsc_vty.c b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
index d871f015a..e623c9c10 100644
--- a/openbsc/src/osmo-bsc/osmo_bsc_vty.c
+++ b/openbsc/src/osmo-bsc/osmo_bsc_vty.c
@@ -43,7 +43,7 @@ static struct osmo_bsc_data *osmo_bsc_data(struct vty *vty)
static struct osmo_msc_data *osmo_msc_data(struct vty *vty)
{
- return osmo_msc_data_find(bsc_gsmnet, (int) vty->index);
+ return vty->index;
}
static struct cmd_node bsc_node = {
@@ -70,7 +70,7 @@ DEFUN(cfg_net_msc, cfg_net_msc_cmd,
return CMD_WARNING;
}
- vty->index = (void *) index;
+ vty->index = msc;
vty->node = MSC_NODE;
return CMD_SUCCESS;
}