]> git.sesse.net Git - vlc/blobdiff - modules/codec/cmml/history.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / codec / cmml / history.c
index 9efbab9f0f8fc7440fba7ab41172939da523aa0e..1b80c8c6c3fcb87abf0f49b8e310b3c3fd1c0ed8 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 #include <vlc/vlc.h>
+#include <vlc_input.h>
 
 #include "history.h"
 
@@ -49,10 +50,10 @@ static void history_Dump( history_t *p_history );
  * Actual history code
  *****************************************************************************/
 
-history_t *history_New()
+history_t *history_New( void )
 {
    history_t *p_new_history;
-   
    p_new_history = calloc( 1, sizeof( struct history_t ) );
    if( p_new_history == NULL ) return NULL;
 
@@ -107,14 +108,18 @@ static void history_Dump( history_t *p_history )
         void *pv_item;
 
         xarray_ObjectAtIndex( p_history->p_xarray, i, &pv_item );
-        
+
         p_item = (history_item_t *) pv_item;
 
         if( p_item == NULL )
             fprintf( stderr, "HISTORY: [%d] NULL\n", i );
         else
+        {
+            char *psz_uri = input_item_GetURI( p_item );
             fprintf( stderr, "HISTORY: [%d] %p (%p->%s)\n", i, p_item,
-                     p_item->psz_uri, p_item->psz_uri );
+                     psz_uri, psz_uri );
+            free( psz_uri );
+        }
     }
 }
 
@@ -203,7 +208,7 @@ void history_PruneAndInsert( history_t *p_history, history_item_t *p_item )
 
 unsigned int history_Count( history_t *p_history )
 {
-    int i_count;
+    unsigned int i_count;
     xarray_Count( p_history->p_xarray, &i_count );
     return i_count;
 }