eina: remove logically dead code.
authorCedric BAIL <c.bail@partner.samsung.com>
Thu, 5 Jun 2014 01:24:46 +0000 (03:24 +0200)
committerCedric BAIL <c.bail@partner.samsung.com>
Thu, 5 Jun 2014 01:24:46 +0000 (03:24 +0200)
I am wondering why this code was around, an useless variable and an if
that would never be taken...

CID 1039940.

src/lib/eina/eina_inlist.c

index 13ad0e2..6753b58 100644 (file)
@@ -812,7 +812,6 @@ eina_inlist_sort(Eina_Inlist *head, Eina_Compare_Cb func)
    unsigned int i = 0;
    unsigned int n = 0;
    Eina_Inlist *tail = head;
-   Eina_Inlist *unsort = NULL;
    Eina_Inlist *stack[EINA_INLIST_SORT_STACK_SIZE];
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(head, NULL);
@@ -849,12 +848,6 @@ eina_inlist_sort(Eina_Inlist *head, Eina_Compare_Cb func)
    head = stack[0];
    tail = eina_inlist_sort_rebuild_prev(head);
 
-   if (unsort)
-     {
-        tail->next = unsort;
-        unsort->prev = tail;
-     }
-
    head->last = tail;
 
    return head;