aboutsummaryrefslogtreecommitdiffstats
path: root/src/libbsc/chan_alloc.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2017-11-29 12:45:34 +0100
committerMax <msuraev@sysmocom.de>2017-11-29 14:23:13 +0000
commitd0ff694cb94e350b240120e75e19ab4fd31cbe7f (patch)
treeaf690c814dd868cd3cb71e8ecc2fd5e937140a1d /src/libbsc/chan_alloc.c
parent8c209c9e2b9cbf9b5f6f2f3ce6fd734b03f79a59 (diff)
cosmetic: tighten function type signatures
* change return type to bool * constify parameters The nm_is_running(), trx_is_usable() and ts_is_usable() always return boolean value and are always used as such anyway. The also do not change their parameters. Change-Id: I6a572fc78371c69f5308edbad0ebe15e143d0505
Diffstat (limited to 'src/libbsc/chan_alloc.c')
-rw-r--r--src/libbsc/chan_alloc.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libbsc/chan_alloc.c b/src/libbsc/chan_alloc.c
index f0275bc96..4b2531eac 100644
--- a/src/libbsc/chan_alloc.c
+++ b/src/libbsc/chan_alloc.c
@@ -36,41 +36,41 @@
#include <osmocom/core/talloc.h>
-static int ts_is_usable(struct gsm_bts_trx_ts *ts)
+static bool ts_is_usable(const struct gsm_bts_trx_ts *ts)
{
/* FIXME: How does this behave for BS-11 ? */
if (is_ipaccess_bts(ts->trx->bts)) {
if (!nm_is_running(&ts->mo.nm_state))
- return 0;
+ return false;
}
/* If a TCH/F_PDCH TS is busy changing, it is already taken or not
* yet available. */
if (ts->pchan == GSM_PCHAN_TCH_F_PDCH) {
if (ts->flags & TS_F_PDCH_PENDING_MASK)
- return 0;
+ return false;
}
/* If a dynamic channel is busy changing, it is already taken or not
* yet available. */
if (ts->pchan == GSM_PCHAN_TCH_F_TCH_H_PDCH) {
if (ts->dyn.pchan_is != ts->dyn.pchan_want)
- return 0;
+ return false;
}
- return 1;
+ return true;
}
-int trx_is_usable(struct gsm_bts_trx *trx)
+bool trx_is_usable(const struct gsm_bts_trx *trx)
{
/* FIXME: How does this behave for BS-11 ? */
if (is_ipaccess_bts(trx->bts)) {
if (!nm_is_running(&trx->mo.nm_state) ||
!nm_is_running(&trx->bb_transc.mo.nm_state))
- return 0;
+ return false;
}
- return 1;
+ return true;
}
static struct gsm_lchan *