* Local duplication functions, and local deallocation functions
*****************************************************************************/
static void DupDummy( vlc_value_t *p_val ) { (void)p_val; /* unused */ }
-static void DupString( vlc_value_t *p_val ) { if( p_val->psz_string ) p_val->psz_string = strdup( p_val->psz_string ); }
+static void DupString( vlc_value_t *p_val )
+{
+ p_val->psz_string = strdup( p_val->psz_string ? p_val->psz_string : "" );
+}
static void DupList( vlc_value_t *p_val )
{
free( p_var->psz_text );
if( p_val && p_val->psz_string )
p_var->psz_text = strdup( p_val->psz_string );
+ else
+ p_val->psz_text = NULL;
break;
case VLC_VAR_GETTEXT:
p_val->psz_string = NULL;
/* Duplicate value if needed */
p_var->ops->pf_dup( p_val );
- msg_Dbg( p_this, "Inherited value for var %s from object %s", psz_name ? : "(null)",
- p_this->psz_object_name ? : "(Unknown)" ) ;
+ /*msg_Dbg( p_this, "Inherited value for var %s from object %s",
+ psz_name ? psz_name : "(null)",
+ p_this->psz_object_name
+ ? p_this->psz_object_name : "(Unknown)" );*/
return VLC_SUCCESS;
}
else if ( p_this->p_parent ) /* We are still not there */
break;
}
default:
- msg_Warn( p_this, "Could not inherit value for var %s from config. Invalid Type", psz_name ) ;
+ msg_Warn( p_this, "Could not inherit value for var %s "
+ "from config. Invalid Type", psz_name );
return VLC_ENOOBJ;
break;
}
- msg_Dbg( p_this, "Inherited value for var %s from config", psz_name ) ;
+ /*msg_Dbg( p_this, "Inherited value for var %s from config", psz_name );*/
return VLC_SUCCESS;
}