deps-libff: Fix sequence-point warning
Silly code that pre-incremented a value while also assigning it to the same value.
This commit is contained in:
parent
f1f5484b16
commit
94e58057fd
4
deps/libff/libff/ff-circular-queue.c
vendored
4
deps/libff/libff/ff-circular-queue.c
vendored
@ -116,7 +116,7 @@ void *ff_circular_queue_peek_write(struct ff_circular_queue *cq)
|
||||
void ff_circular_queue_advance_write(struct ff_circular_queue *cq, void *item)
|
||||
{
|
||||
cq->slots[cq->write_index] = item;
|
||||
cq->write_index = ++cq->write_index % cq->capacity;
|
||||
cq->write_index = (cq->write_index + 1) % cq->capacity;
|
||||
|
||||
queue_lock(cq);
|
||||
++cq->size;
|
||||
@ -130,7 +130,7 @@ void *ff_circular_queue_peek_read(struct ff_circular_queue *cq)
|
||||
|
||||
void ff_circular_queue_advance_read(struct ff_circular_queue *cq)
|
||||
{
|
||||
cq->read_index = ++cq->read_index % cq->capacity;
|
||||
cq->read_index = (cq->read_index + 1) % cq->capacity;
|
||||
queue_lock(cq);
|
||||
--cq->size;
|
||||
queue_signal(cq);
|
||||
|
Loading…
x
Reference in New Issue
Block a user