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

ib subversion at mplayerhq.hu
Thu Feb 23 12:44:50 CET 2012


Author: ib
Date: Thu Feb 23 12:44:49 2012
New Revision: 34762

Log:
Revise listMgr() command PLAYLIST_ITEM_ADD.

Change return value to pointer to current playlist item.

Additionally, some cosmetic code and formatting changes.

Modified:
   trunk/gui/util/list.c

Modified: trunk/gui/util/list.c
==============================================================================
--- trunk/gui/util/list.c	Thu Feb 23 10:32:28 2012	(r34761)
+++ trunk/gui/util/list.c	Thu Feb 23 12:44:49 2012	(r34762)
@@ -41,6 +41,7 @@ void *listMgr(int cmd, void *data)
         return plList;
 
     case PLAYLIST_ITEM_ADD:
+
         if (plList) {
             plItem *item = plList;
 
@@ -51,10 +52,11 @@ void *listMgr(int cmd, void *data)
             pdat->prev = item;
             pdat->next = NULL;
         } else {
-            pdat->prev = pdat->next = NULL;
+            pdat->next = pdat->prev = NULL;
             plCurrent  = plList = pdat;
         }
-        return NULL;
+
+        return plCurrent;
 
     case PLAYLIST_ITEM_INSERT:
         if (plCurrent) {


More information about the MPlayer-cvslog mailing list