bts_is_online(): make the BTS pointer const, return bool

Change-Id: Idb4f9f8862041c5902df0e6e8d1ac2a60ada95df
This commit is contained in:
Vadim Yanitskiy 2023-04-28 02:19:07 +07:00
parent 758634eadf
commit 856c6dc2f5
1 changed files with 3 additions and 3 deletions

View File

@ -888,14 +888,14 @@ int bts_depend_is_depedency(struct gsm_bts *base, struct gsm_bts *other)
return (base->depends_on[idx] & (1U << bit)) > 0; return (base->depends_on[idx] & (1U << bit)) > 0;
} }
static int bts_is_online(struct gsm_bts *bts) static bool bts_is_online(const struct gsm_bts *bts)
{ {
/* TODO: support E1 BTS too */ /* TODO: support E1 BTS too */
if (!is_ipaccess_bts(bts)) if (!is_ipaccess_bts(bts))
return 1; return true;
if (!bts->oml_link) if (!bts->oml_link)
return 0; return false;
return bts->mo.nm_state.operational == NM_OPSTATE_ENABLED; return bts->mo.nm_state.operational == NM_OPSTATE_ENABLED;
} }