laforge submitted this change.

View Change

Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
RIFO: Fix operator precedence issue in the math for bucket_for_fn

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Iff91cfe93e8c7b53998b1b4dd73684292c105cc8
---
M src/octoi/frame_rifo.c
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/octoi/frame_rifo.c b/src/octoi/frame_rifo.c
index ae10ff2..7e8ddf7 100644
--- a/src/octoi/frame_rifo.c
+++ b/src/octoi/frame_rifo.c
@@ -47,7 +47,7 @@
{
uint32_t next_out_bucket = (rifo->next_out - rifo->buf) / BYTES_PER_FRAME;
/* offset in frames compared to next_out */
- uint32_t offset = fn - rifo->next_out_fn % FRAMES_PER_FIFO;
+ uint32_t offset = (fn - rifo->next_out_fn) % FRAMES_PER_FIFO;
return (next_out_bucket + offset) % FRAMES_PER_FIFO;
}


To view, visit change 27799. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Iff91cfe93e8c7b53998b1b4dd73684292c105cc8
Gerrit-Change-Number: 27799
Gerrit-PatchSet: 1
Gerrit-Owner: tnt <tnt@246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-MessageType: merged