fix(linkedlist_queue.c): Remove redundant conditional judgments. (#1055)

pull/1062/head
gonglja 10 months ago committed by GitHub
parent 504c6b0568
commit e69f60c07c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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

Loading…
Cancel
Save