More of the same.
Postfix/prefix increment evaluation order is not changed by parantheses. Use '+ 1' for readability instead. CID 2982. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39966 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -54,7 +54,7 @@ dpc_thread(void *arg)
|
|||||||
acquire_spinlock(&queue->lock);
|
acquire_spinlock(&queue->lock);
|
||||||
|
|
||||||
dpc = queue->slots[queue->head];
|
dpc = queue->slots[queue->head];
|
||||||
queue->head = (queue->head++) % queue->size;
|
queue->head = (queue->head + 1) % queue->size;
|
||||||
queue->count--;
|
queue->count--;
|
||||||
|
|
||||||
release_spinlock(&queue->lock);
|
release_spinlock(&queue->lock);
|
||||||
@@ -67,7 +67,7 @@ dpc_thread(void *arg)
|
|||||||
// Otherwise, resource could leaks...
|
// Otherwise, resource could leaks...
|
||||||
while (queue->count--) {
|
while (queue->count--) {
|
||||||
dpc = queue->slots[queue->head];
|
dpc = queue->slots[queue->head];
|
||||||
queue->head = (queue->head++) % queue->size;
|
queue->head = (queue->head + 1) % queue->size;
|
||||||
dpc.function(dpc.arg);
|
dpc.function(dpc.arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user