forgot to add a subtraction in length of the node
This commit is contained in:
@@ -81,6 +81,7 @@ void q_add_node(Q* q, QNode* node) {
|
|||||||
void q_remove_node(Q* q) {
|
void q_remove_node(Q* q) {
|
||||||
QNode* n = q->head;
|
QNode* n = q->head;
|
||||||
q->head = n->next;
|
q->head = n->next;
|
||||||
|
q->length--;
|
||||||
free(n);
|
free(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user