Skip to content

Commit

Permalink
Explicitly use the index computed on previous line
Browse files Browse the repository at this point in the history
  • Loading branch information
polytypic committed May 25, 2024
1 parent 44effa9 commit 5b0973b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src_lockfree/spsc_queue.ml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ let pop_or_peek_as (type a r) (t : a t) op (poly : (a, r) poly) : r =
then match poly with Value -> raise_notrace Empty | Option -> None
else
let index = head land (Array.length t.array - 1) in
let v = Array.unsafe_get t.array (head land (Array.length t.array - 1)) in
let v = Array.unsafe_get t.array index in
begin
match op with
| Pop ->
Expand Down

0 comments on commit 5b0973b

Please sign in to comment.