]> git.sesse.net Git - vlc/blobdiff - src/modules/modules.c
Removes trailing spaces. Removes tabs.
[vlc] / src / modules / modules.c
index 6d7f5ab9fd5052086082aafb54e08551cde4dcd3..ec3b393b6badab1373d9963581fc7651cc8a5686 100644 (file)
@@ -371,7 +371,7 @@ const char *module_GetName( const module_t *m, vlc_bool_t long_name )
 {
     if( long_name && ( m->psz_longname != NULL) )
         return m->psz_longname;
-    
     return m->psz_shortname ?: m->psz_object_name;
 }
 
@@ -805,7 +805,7 @@ char ** __module_GetModulesNamesForCapability( vlc_object_t *p_this,
     psz_ret[count] = NULL;
 
     vlc_list_release( p_list );
-    
     return psz_ret;
 }
 
@@ -1665,7 +1665,7 @@ static char * GetWindowsError( void )
  *****************************************************************************/
 static void CacheLoad( vlc_object_t *p_this )
 {
-    char *psz_filename, *psz_homedir;
+    char *psz_filename, *psz_cachedir;
     FILE *file;
     int i, j, i_size, i_read;
     char p_cachestring[sizeof(PLUGINSCACHE_DIR COPYRIGHT_MESSAGE)];
@@ -1675,15 +1675,15 @@ static void CacheLoad( vlc_object_t *p_this )
     int32_t i_file_size, i_marker;
     libvlc_global_data_t *p_libvlc_global = vlc_global();
 
-    psz_homedir = p_this->p_libvlc->psz_homedir;
-    if( !psz_homedir )
+    psz_cachedir = p_this->p_libvlc->psz_cachedir;
+    if( !psz_cachedir ) /* XXX: this should never happen */
     {
-        msg_Err( p_this, "psz_homedir is null" );
+        msg_Err( p_this, "Unable to get cache directory" );
         return;
     }
 
-    i_size = asprintf( &psz_filename, "%s"DIR_SEP"%s"DIR_SEP"%s"DIR_SEP"%s",
-            psz_homedir, CONFIG_DIR, PLUGINSCACHE_DIR, CacheName() );
+    i_size = asprintf( &psz_filename, "%s"DIR_SEP"%s"DIR_SEP"%s",
+            psz_cachedir, PLUGINSCACHE_DIR, CacheName() );
     if( i_size <= 0 )
     {
         msg_Err( p_this, "out of memory" );
@@ -2022,22 +2022,23 @@ static void CacheSave( vlc_object_t *p_this )
         "# For information about cache directory tags, see:\r\n"
         "#   http://www.brynosaurus.com/cachedir/\r\n";
 
-    char *psz_filename, *psz_homedir;
+    char *psz_filename, *psz_cachedir;
     FILE *file;
     int i, j, i_cache;
     module_cache_t **pp_cache;
     int32_t i_file_size = 0;
     libvlc_global_data_t *p_libvlc_global = vlc_global();
 
-    psz_homedir = p_this->p_libvlc->psz_homedir;
-    if( !psz_homedir )
+    psz_cachedir = p_this->p_libvlc->psz_cachedir;
+    if( !psz_cachedir ) /* XXX: this should never happen */
     {
-        msg_Err( p_this, "psz_homedir is null" );
+        msg_Err( p_this, "Unable to get cache directory" );
         return;
     }
+
     psz_filename =
-       (char *)malloc( sizeof(DIR_SEP CONFIG_DIR DIR_SEP PLUGINSCACHE_DIR DIR_SEP ) +
-                       strlen(psz_homedir) + strlen(CacheName()) );
+       (char *)malloc( sizeof(DIR_SEP PLUGINSCACHE_DIR DIR_SEP ) +
+                       strlen(psz_cachedir) + strlen(CacheName()) );
 
     if( !psz_filename )
     {
@@ -2045,7 +2046,7 @@ static void CacheSave( vlc_object_t *p_this )
         return;
     }
 
-    sprintf( psz_filename, "%s"DIR_SEP"%s", psz_homedir, CONFIG_DIR );
+    sprintf( psz_filename, "%s", psz_cachedir );
 
     config_CreateDir( p_this, psz_filename );
 
@@ -2062,7 +2063,7 @@ static void CacheSave( vlc_object_t *p_this )
         fclose( file );
     }
 
-    sprintf( psz_filename, "%s"DIR_SEP"%s"DIR_SEP"%s"DIR_SEP"%s", psz_homedir, CONFIG_DIR,
+    sprintf( psz_filename, "%s"DIR_SEP"%s"DIR_SEP"%s", psz_cachedir,
              PLUGINSCACHE_DIR, CacheName() );
 
     msg_Dbg( p_this, "saving plugins cache file %s", psz_filename );