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 <[email protected]>
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;
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/27799
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Iff91cfe93e8c7b53998b1b4dd73684292c105cc8
Gerrit-Change-Number: 27799
Gerrit-PatchSet: 1
Gerrit-Owner: tnt <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-MessageType: merged

Reply via email to