[S] Change in libosmo-gprs[master]: rlcmac: cosmetic: use ARRAY_SIZE() in handle_pkt_dl_ass()
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-gprs/+/31948 ) Change subject: rlcmac: cosmetic: use ARRAY_SIZE() in handle_pkt_dl_ass() ...................................................................... rlcmac: cosmetic: use ARRAY_SIZE() in handle_pkt_dl_ass() Change-Id: I98cff9c38ef8d44669ae233f2cf1c7d815e27ff8 --- M src/rlcmac/tbf_dl_ass_fsm.c 1 file changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmo-gprs refs/changes/48/31948/1 diff --git a/src/rlcmac/tbf_dl_ass_fsm.c b/src/rlcmac/tbf_dl_ass_fsm.c index 9f13e75..74e1853 100644 --- a/src/rlcmac/tbf_dl_ass_fsm.c +++ b/src/rlcmac/tbf_dl_ass_fsm.c @@ -98,7 +98,6 @@ { const Packet_Downlink_Assignment_t *dlass = &d->dl_block->u.Packet_Downlink_Assignment; - unsigned int i; if (dlass->Exist_DOWNLINK_TFI_ASSIGNMENT) ctx->alloc.dl_tfi = dlass->DOWNLINK_TFI_ASSIGNMENT; @@ -110,7 +109,7 @@ ctx->tbf_starting_time = TBF_Starting_Frame_Number_to_fn(&dlass->TBF_Starting_Time, d->fn); ctx->alloc.num_ts = 0; - for (i = 0; i < 8; i++) { + for (unsigned int i = 0; i < ARRAY_SIZE(ctx->alloc.ts); i++) { ctx->alloc.ts[i].allocated = (dlass->TIMESLOT_ALLOCATION >> i) & 0x01; if (ctx->alloc.ts[i].allocated) ctx->alloc.num_ts++; -- To view, visit https://gerrit.osmocom.org/c/libosmo-gprs/+/31948 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-gprs Gerrit-Branch: master Gerrit-Change-Id: I98cff9c38ef8d44669ae233f2cf1c7d815e27ff8 Gerrit-Change-Number: 31948 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-MessageType: newchange
participants (1)
-
fixeria