aboutsummaryrefslogtreecommitdiffstats
path: root/include/osmocom/gsm
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2019-06-12 15:50:57 +0700
committerfixeria <axilirator@gmail.com>2019-06-12 11:29:06 +0000
commitb8734baa23000754b407f829349e11d7bcc00e40 (patch)
treeb877cd4cbb64f8cf15b414cf24b27dbd02016a96 /include/osmocom/gsm
parentd9fc6041e7cba69fe42419bafaeaaa7cfeb6d8c2 (diff)
protocol/gsm_04_08.h: do not check if unsigned is positive
Diffstat (limited to 'include/osmocom/gsm')
-rw-r--r--include/osmocom/gsm/protocol/gsm_04_08.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h
index 16910c35..2be6ed34 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08.h
@@ -719,7 +719,7 @@ struct gsm48_rach_control {
*/
static inline void gsm48_barr_acc(struct gsm48_rach_control *rach_control, unsigned int acc)
{
- OSMO_ASSERT(acc >= 0 && acc <= 15);
+ OSMO_ASSERT(acc <= 15);
if (acc >= 8)
rach_control->t2 |= (1 << (acc - 8));
else
@@ -733,7 +733,7 @@ static inline void gsm48_barr_acc(struct gsm48_rach_control *rach_control, unsig
*/
static inline void gsm48_allow_acc(struct gsm48_rach_control *rach_control, unsigned int acc)
{
- OSMO_ASSERT(acc >= 0 && acc <= 15);
+ OSMO_ASSERT(acc <= 15);
if (acc >= 8)
rach_control->t2 &= ~(1 << (acc - 8));
else
@@ -748,7 +748,7 @@ static inline void gsm48_allow_acc(struct gsm48_rach_control *rach_control, unsi
*/
static inline bool gsm48_acc_is_barred(struct gsm48_rach_control *rach_control, unsigned int acc)
{
- OSMO_ASSERT(acc >= 0 && acc <= 15);
+ OSMO_ASSERT(acc <= 15);
if (acc >= 8)
return (rach_control->t2 & (1 << (acc - 8))) != 0;
return (rach_control->t3 & (1 << (acc))) != 0;