mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-14 22:26:46 +02: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:
@ -519,8 +519,10 @@ g_queue_push_nth_link (GQueue *queue,
|
||||
if (queue->head->prev)
|
||||
queue->head = queue->head->prev;
|
||||
|
||||
if (queue->tail->next)
|
||||
queue->tail = queue->tail->next;
|
||||
/* The case where we’re pushing @link_ at the end of @queue is handled above
|
||||
* using g_queue_push_tail_link(), so we should never have to manually adjust
|
||||
* queue->tail. */
|
||||
g_assert (queue->tail->next == NULL);
|
||||
|
||||
queue->length++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user