[vlc-devel] commit: fix ticket #1482 (and most problems with config saving by the way) ( Rafaël Carré )

git version control git at videolan.org
Tue Mar 11 09:05:08 CET 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Tue Mar 11 01:49:55 2008 +0100| [dec4051286cdda84b13a686b574d5360c7e4560e]

fix ticket #1482 (and most problems with config saving by the way)
regression was introduced in [92290c9d7485934444efcfbb61c27f3bc94a61d3] (more than one year ago Oo )

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dec4051286cdda84b13a686b574d5360c7e4560e
---

 src/config/file.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/config/file.c b/src/config/file.c
index 61ef356..289f618 100644
--- a/src/config/file.c
+++ b/src/config/file.c
@@ -424,7 +424,6 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
     p_bigbuffer = p_index = malloc( i_sizebuf+1 );
     if( !p_bigbuffer )
     {
-        msg_Err( p_this, "out of memory" );
         if( file ) fclose( file );
         vlc_mutex_unlock( &p_this->p_libvlc->config_lock );
         return -1;
@@ -631,7 +630,7 @@ int config_AutoSaveConfigFile( vlc_object_t *p_this )
     vlc_list_t *p_list;
     int i_index, i_count;
 
-    if( !p_this ) return -1;
+    assert( p_this );
 
     /* Check if there's anything to save */
     vlc_mutex_lock( &p_this->p_libvlc->config_lock );
@@ -650,7 +649,7 @@ int config_AutoSaveConfigFile( vlc_object_t *p_this )
         {
             if( p_item->b_autosave && p_item->b_dirty ) break;
         }
-        break;
+        if( p_item < p_end ) break;
     }
     vlc_list_release( p_list );
     vlc_mutex_unlock( &p_this->p_libvlc->config_lock );




More information about the vlc-devel mailing list