mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-08 10:26:16 +01:00
gqueue: Remove a redundant branch
queue->tail->next cannot be non-NULL, as pushing onto the end of the queue is handled by the call to g_queue_push_tail_link() above. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
4f38620b13
commit
d5093350f3
@ -519,8 +519,10 @@ g_queue_push_nth_link (GQueue *queue,
|
|||||||
if (queue->head->prev)
|
if (queue->head->prev)
|
||||||
queue->head = queue->head->prev;
|
queue->head = queue->head->prev;
|
||||||
|
|
||||||
if (queue->tail->next)
|
/* The case where we’re pushing @link_ at the end of @queue is handled above
|
||||||
queue->tail = queue->tail->next;
|
* using g_queue_push_tail_link(), so we should never have to manually adjust
|
||||||
|
* queue->tail. */
|
||||||
|
g_assert (queue->tail->next == NULL);
|
||||||
|
|
||||||
queue->length++;
|
queue->length++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user