fixeria submitted this change.
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(-)
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 change 31947. To unsubscribe, or for help writing mail filters, visit settings.