]> git.sesse.net Git - vlc/commitdiff
Minor clean up
authorRémi Denis-Courmont <rem@videolan.org>
Thu, 2 Mar 2006 18:19:03 +0000 (18:19 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Thu, 2 Mar 2006 18:19:03 +0000 (18:19 +0000)
include/vlc_common.h
src/misc/objects.c

index 7a9bbae3fabb451bc9fd6d27401d2d72952e556b..b3561e6ad7fc87597b268e6e1c7b8eb80a5a7b74 100644 (file)
@@ -478,7 +478,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
 /**@{*/                                                                     \
     int   i_object_id;                                                      \
     int   i_object_type;                                                    \
-    char *psz_object_type;                                                  \
+    const char *psz_object_type;                                            \
     char *psz_object_name;                                                  \
                                                                             \
     /* Messages header */                                                   \
index 645373344e6fb656479c86945975c3f638bc7901..95aa7b14b4d9751400d397b01fc440f929e8262e 100644 (file)
@@ -99,7 +99,7 @@ static vlc_mutex_t    structure_lock;
 void * __vlc_object_create( vlc_object_t *p_this, int i_type )
 {
     vlc_object_t * p_new;
-    char *         psz_type;
+    const char   * psz_type;
     size_t         i_size;
 
     switch( i_type )
@@ -217,10 +217,8 @@ void * __vlc_object_create( vlc_object_t *p_this, int i_type )
             psz_type = "statistics";
             break;
         default:
-            i_size = i_type > 0
-                      ? i_type > (int)sizeof(vlc_object_t)
-                         ? i_type : (int)sizeof(vlc_object_t)
-                      : (int)sizeof(vlc_object_t);
+            i_size = i_type > (int)sizeof(vlc_object_t)
+                         ? i_type : (int)sizeof(vlc_object_t);
             i_type = VLC_OBJECT_GENERIC;
             psz_type = "generic";
             break;