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:
kc5nra 2015-03-23 22:28:08 -05:00
parent f1f5484b16
commit 94e58057fd

View File

@ -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);