Change in ...libosmocore[master]: protocol/gsm_04_08.h: do not check if unsigned is positive

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Wed Jun 12 08:51:17 UTC 2019


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/14426


Change subject: protocol/gsm_04_08.h: do not check if unsigned is positive
......................................................................

protocol/gsm_04_08.h: do not check if unsigned is positive

Change-Id: I6b486b52a3733d5fd5e8ba18acbc9374e2e8bd7e
---
M include/osmocom/gsm/protocol/gsm_04_08.h
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/26/14426/1

diff --git a/include/osmocom/gsm/protocol/gsm_04_08.h b/include/osmocom/gsm/protocol/gsm_04_08.h
index 16910c3..2be6ed3 100644
--- a/include/osmocom/gsm/protocol/gsm_04_08.h
+++ b/include/osmocom/gsm/protocol/gsm_04_08.h
@@ -719,7 +719,7 @@
  */
 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_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 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;

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14426
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6b486b52a3733d5fd5e8ba18acbc9374e2e8bd7e
Gerrit-Change-Number: 14426
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <axilirator at gmail.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190612/76b463cb/attachment.htm>


More information about the gerrit-log mailing list