fixeria has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/47/31947/1
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); }