tnt has uploaded this change for review.
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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/99/27799/1
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.