]> git.sesse.net Git - vlc/blobdiff - src/misc/epg.c
Cosmetics
[vlc] / src / misc / epg.c
index 3074c77e34fba1226caee791b7cd763411ed27d2..82a7600e4016418f1172a61a06f5599c4e10ad22 100644 (file)
@@ -1,24 +1,24 @@
 /*****************************************************************************
  * epg.c: Electronic Program Guide
  *****************************************************************************
- * Copyright (C) 2007 the VideoLAN team
+ * Copyright (C) 2007 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /*****************************************************************************
@@ -29,9 +29,6 @@
 # include "config.h"
 #endif
 
-#include <ctype.h>
-#include <errno.h>
-
 #include <vlc_common.h>
 #include <vlc_epg.h>
 
@@ -60,7 +57,7 @@ void vlc_epg_Clean( vlc_epg_t *p_epg )
 void vlc_epg_AddEvent( vlc_epg_t *p_epg, int64_t i_start, int i_duration,
                        const char *psz_name, const char *psz_short_description, const char *psz_description )
 {
-    vlc_epg_event_t *p_evt = (vlc_epg_event_t*)malloc( sizeof(vlc_epg_event_t) );
+    vlc_epg_event_t *p_evt = malloc( sizeof(*p_evt) );
     if( !p_evt )
         return;
     p_evt->i_start = i_start;
@@ -68,12 +65,12 @@ void vlc_epg_AddEvent( vlc_epg_t *p_epg, int64_t i_start, int i_duration,
     p_evt->psz_name = psz_name ? strdup( psz_name ) : NULL;
     p_evt->psz_short_description = psz_short_description ? strdup( psz_short_description ) : NULL;
     p_evt->psz_description = psz_description ? strdup( psz_description ) : NULL;
-    TAB_APPEND_CPP( vlc_epg_event_t, p_epg->i_event, p_epg->pp_event, p_evt );
+    TAB_APPEND( p_epg->i_event, p_epg->pp_event, p_evt );
 }
 
 vlc_epg_t *vlc_epg_New( const char *psz_name )
 {
-    vlc_epg_t *p_epg = (vlc_epg_t*)malloc( sizeof(vlc_epg_t) );
+    vlc_epg_t *p_epg = malloc( sizeof(*p_epg) );
     if( p_epg )
         vlc_epg_Init( p_epg, psz_name );
     return p_epg;