/* If the user wants none, give him none. */
if( !strcmp( psz_name, "none" ) )
{
- if( psz_var ) free( psz_var );
+ free( psz_var );
return NULL;
}
p_this->psz_object_name = strdup( p_module->psz_object_name );
}
- if( psz_shortcuts )
- {
- free( psz_shortcuts );
- }
-
- if( psz_var )
- {
- free( psz_var );
- }
+ free( psz_shortcuts );
+ free( psz_var );
/* Don't forget that the module is still locked */
return p_module;
{
vlc_list_t *p_list;
int i;
- char *psz_module_name;
p_list = vlc_list_find( p_this, VLC_OBJECT_MODULE, FIND_ANYWHERE );
for( i = 0 ; i < p_list->i_count; i++)
{
- psz_module_name =
+ const char *psz_module_name =
((module_t *) p_list->p_values[i].p_object)->psz_shortname;
- if ( psz_module_name && !strcmp( psz_module_name, psz_name ) )
+ if( psz_module_name && !strcmp( psz_module_name, psz_name ) )
{
/* We can release the list, and return yes */
vlc_list_release( p_list ); return VLC_TRUE;
}
/* Free plugin-path */
- if( userpath != NULL )
- free( userpath );
+ free( userpath );
}
/*****************************************************************************
p_module->psz_shortname = p_module->psz_shortname ?
strdup( p_module->psz_shortname ) : NULL;
p_module->psz_longname = strdup( p_module->psz_longname );
+ p_module->psz_help = p_module->psz_help ? strdup( p_module->psz_help )
+ : NULL;
if( p_module->psz_program != NULL )
{
for( pp_shortcut = p_module->pp_shortcuts ; *pp_shortcut ; pp_shortcut++ )
{
- free( (void *)*pp_shortcut );
+ free( (void*)*pp_shortcut );
}
- free( (void *)p_module->psz_object_name );
- free( (void *)p_module->psz_capability );
- if( p_module->psz_shortname ) free( (void *)p_module->psz_shortname );
- free( (void *)p_module->psz_longname );
-
- if( p_module->psz_program != NULL )
- {
- free( (void *)p_module->psz_program );
- }
+ free( (void*)p_module->psz_object_name );
+ free( (void*)p_module->psz_capability );
+ free( (void*)p_module->psz_shortname );
+ free( (void*)p_module->psz_longname );
+ free( (void*)p_module->psz_help );
+ free( (void*)p_module->psz_program );
}
#endif /* HAVE_DYNAMIC_PLUGINS */
LOAD_STRING( pp_cache[i]->p_module->psz_object_name );
LOAD_STRING( pp_cache[i]->p_module->psz_shortname );
LOAD_STRING( pp_cache[i]->p_module->psz_longname );
+ LOAD_STRING( pp_cache[i]->p_module->psz_help );
LOAD_STRING( pp_cache[i]->p_module->psz_program );
for( j = 0; j < MODULE_SHORTCUT_MAX; j++ )
{
LOAD_STRING( p_module->psz_object_name );
LOAD_STRING( p_module->psz_shortname );
LOAD_STRING( p_module->psz_longname );
+ LOAD_STRING( p_module->psz_help );
LOAD_STRING( p_module->psz_program );
for( j = 0; j < MODULE_SHORTCUT_MAX; j++ )
{
SAVE_STRING( pp_cache[i]->p_module->psz_object_name );
SAVE_STRING( pp_cache[i]->p_module->psz_shortname );
SAVE_STRING( pp_cache[i]->p_module->psz_longname );
+ SAVE_STRING( pp_cache[i]->p_module->psz_help );
SAVE_STRING( pp_cache[i]->p_module->psz_program );
for( j = 0; j < MODULE_SHORTCUT_MAX; j++ )
{
SAVE_STRING( p_module->psz_object_name );
SAVE_STRING( p_module->psz_shortname );
SAVE_STRING( p_module->psz_longname );
+ SAVE_STRING( p_module->psz_help );
SAVE_STRING( p_module->psz_program );
for( j = 0; j < MODULE_SHORTCUT_MAX; j++ )
{