laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/27799 )
Change subject: RIFO: Fix operator precedence issue in the math for bucket_for_fn ......................................................................
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(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
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; }