fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmo-gprs/+/31947 )

Change subject: rlcmac: cosmetic: use ARRAY_SIZE() in dl_tbf_dl_slotmask()
......................................................................

rlcmac: cosmetic: use ARRAY_SIZE() in dl_tbf_dl_slotmask()

Change-Id: I3e0ac847e1fc5af190ffd38e04e3745ab68e4ec5
---
M src/rlcmac/tbf_dl.c
1 file changed, 10 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, approved




diff --git a/src/rlcmac/tbf_dl.c b/src/rlcmac/tbf_dl.c
index 13b4aab..4ed0bfd 100644
--- a/src/rlcmac/tbf_dl.c
+++ b/src/rlcmac/tbf_dl.c
@@ -85,10 +85,9 @@

 static uint8_t dl_tbf_dl_slotmask(struct gprs_rlcmac_dl_tbf *dl_tbf)
 {
-       uint8_t i;
        uint8_t dl_slotmask = 0;

-       for (i = 0; i < 8; i++) {
+       for (unsigned int i = 0; i < ARRAY_SIZE(dl_tbf->cur_alloc.ts); i++) {
                if (dl_tbf->cur_alloc.ts[i].allocated)
                        dl_slotmask |= (1 << i);
        }

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

Gerrit-Project: libosmo-gprs
Gerrit-Branch: master
Gerrit-Change-Id: I3e0ac847e1fc5af190ffd38e04e3745ab68e4ec5
Gerrit-Change-Number: 31947
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanits...@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanits...@sysmocom.de>
Gerrit-Reviewer: pespin <pes...@sysmocom.de>
Gerrit-MessageType: merged

Reply via email to