Changeset 1eea47cd41875604da84a414e17511920f88a40d

Show
Ignore:
Timestamp:
05/08/08 22:08:46 (2 months ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1210277326 +0300
git-parent:

[a8c44b836bd56fa4676f4fe18a73ee166aa0516a]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1210277319 +0300
Message:

DeleteModule? cannot fail * don't handle impossible errors

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/modules/modules.c

    ra8c44b8 r1eea47c  
    101101#endif 
    102102static int  AllocateBuiltinModule( vlc_object_t *, int ( * ) ( module_t * ) ); 
    103 static int DeleteModule ( module_t *, bool ); 
     103static void DeleteModule ( module_t *, bool ); 
    104104#ifdef HAVE_DYNAMIC_PLUGINS 
    105105static void   DupModule        ( module_t * ); 
     
    218218    { 
    219219        p_next = (module_t *)p_libvlc_global->p_module_bank->pp_children[0]; 
    220  
    221         if( DeleteModule( p_next, true ) ) 
    222         { 
    223             /* Module deletion failed */ 
    224             msg_Err( p_this, "module \"%s\" can't be removed, trying harder", 
    225                      p_next->psz_object_name ); 
    226  
    227             /* We just free the module by hand. Niahahahahaha. */ 
    228             vlc_object_detach( p_next ); 
    229             vlc_object_release( p_next ); 
    230         } 
     220        DeleteModule( p_next, true ); 
    231221    } 
    232222 
     
    14031393 * This function can only be called if the module isn't being used. 
    14041394 *****************************************************************************/ 
    1405 static int DeleteModule( module_t * p_module, bool b_detach ) 
    1406 
    1407     if( !p_module ) return VLC_EGENERIC; 
     1395static void DeleteModule( module_t * p_module, bool b_detach ) 
     1396
     1397    assert( p_module ); 
     1398 
    14081399    if( b_detach ) 
    14091400        vlc_object_detach( p_module ); 
     
    14321423    config_Free( p_module ); 
    14331424    vlc_object_release( p_module ); 
    1434     p_module = NULL; 
    1435     return 0; 
    1436 
     1425