pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/27879 )
Change subject: rsl_rx_ccch_load: Use UINT16_MAX instead of -1 ......................................................................
rsl_rx_ccch_load: Use UINT16_MAX instead of -1
The variables are unsigned, so -1 gets actually translated to UNIT16_MAX when the value is casted to uint16_t. Let's do that explicitly so that readers don't think those are signed variables.
Change-Id: I02ad80e5d10f1a47cdf712f7f7c576a2e20fe607 --- M src/osmo-bsc/abis_rsl.c 1 file changed, 4 insertions(+), 4 deletions(-)
Approvals: fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, approved Jenkins Builder: Verified
diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 0ede339..b5375e0 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -2328,14 +2328,14 @@ struct ccch_signal_data sd;
sd.bts = sign_link->trx->bts; - sd.rach_slot_count = -1; - sd.rach_busy_count = -1; - sd.rach_access_count = -1; + sd.rach_slot_count = UINT16_MAX; + sd.rach_busy_count = UINT16_MAX; + sd.rach_access_count = UINT16_MAX;
switch (rslh->data[0]) { case RSL_IE_PAGING_LOAD: sd.pg_buf_space = rslh->data[1] << 8 | rslh->data[2]; - if (is_ipaccess_bts(sign_link->trx->bts) && sd.pg_buf_space == 0xffff) { + if (is_ipaccess_bts(sign_link->trx->bts) && sd.pg_buf_space == UINT16_MAX) { /* paging load below configured threshold, use 50 as default */ sd.pg_buf_space = 50; }