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.
This commit is contained in:
Neels Hofmeyr 2016-03-26 21:35:11 +01:00 committed by Harald Welte
parent 3ad0346f00
commit 56ea30ff3f
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}