Skip to content

Commit

Permalink
fix(linkedlist_queue.c): Remove redundant conditional judgments. (kra…
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonglja authored Jan 23, 2024
1 parent 504c6b0 commit e69f60c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codes/c/chapter_stack_and_queue/linkedlist_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ LinkedListQueue *newLinkedListQueue() {
/* 析构函数 */
void delLinkedListQueue(LinkedListQueue *queue) {
// 释放所有节点
for (int i = 0; i < queue->queSize && queue->front != NULL; i++) {
while (queue->front != NULL) {
ListNode *tmp = queue->front;
queue->front = queue->front->next;
free(tmp);
Expand Down

0 comments on commit e69f60c

Please sign in to comment.