| 90 | } |
| 91 | |
| 92 | void *dequeue(struct queue *q) { |
| 93 | if (queue_empty(q)) { |
| 94 | return NULL; |
| 95 | } |
| 96 | |
| 97 | void *ret = q->data[q->front]; |
| 98 | q->front = (q->front + 1) % q->capacity; |
| 99 | |
| 100 | return ret; |
| 101 | } |
| 102 | |
| 103 | void free_queue(struct queue q) { |
| 104 | free(q.data); |
no test coverage detected