[MPlayer-cvslog] r34763 - trunk/gui/util/list.c

ib subversion at mplayerhq.hu
Thu Feb 23 13:25:58 CET 2012


Author: ib
Date: Thu Feb 23 13:25:57 2012
New Revision: 34763

Log:
Revise listMgr() command PLAYLIST_ITEM_INSERT.

Remove unnecessary variable curr.

Additionally, some cosmetic formatting changes.

Modified:
   trunk/gui/util/list.c

Modified: trunk/gui/util/list.c
==============================================================================
--- trunk/gui/util/list.c	Thu Feb 23 12:44:49 2012	(r34762)
+++ trunk/gui/util/list.c	Thu Feb 23 13:25:57 2012	(r34763)
@@ -59,16 +59,17 @@ void *listMgr(int cmd, void *data)
         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


More information about the MPlayer-cvslog mailing list