changeset 34675:45b2c7bbec60

Revise listMgr() command PLAYLIST_ITEM_INSERT. Remove unnecessary variable curr. Additionally, some cosmetic formatting changes.
author ib
date Thu, 23 Feb 2012 12:25:57 +0000
parents a99f159b137d
children 207272df4aef
files gui/util/list.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gui/util/list.c	Thu Feb 23 11:44:49 2012 +0000
+++ b/gui/util/list.c	Thu Feb 23 12:25:57 2012 +0000
@@ -59,16 +59,17 @@
         return plCurrent;
 
     case PLAYLIST_ITEM_INSERT:
+
         if (plCurrent) {
-            plItem *curr = plCurrent;
-            pdat->next = curr->next;
+            pdat->next = plCurrent->next;
 
             if (pdat->next)
                 pdat->next->prev = pdat;
 
-            pdat->prev = curr;
-            curr->next = pdat;
-            plCurrent  = plCurrent->next;
+            pdat->prev      = plCurrent;
+            plCurrent->next = pdat;
+
+            plCurrent = pdat;
 
             return plCurrent;
         } else