X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Finterface%2Fintf_msg.c;h=dcb5b92ea29a917bfba461f6f8e36e8e6fc8a726;hb=ffa693e8bdac429c229fa679e64a8bd6cd6af15f;hp=1e06e83aea3faa454f5f4388f7d512888959743e;hpb=4542979c0fecaf06caebec3abd6b0060ede2f1d9;p=vlc diff --git a/src/interface/intf_msg.c b/src/interface/intf_msg.c index 1e06e83aea..dcb5b92ea2 100644 --- a/src/interface/intf_msg.c +++ b/src/interface/intf_msg.c @@ -383,11 +383,11 @@ static void QueueMsg( intf_msg_t *p_msg, int i_type, char *psz_format, va_list a /* * Convert message to string */ -#if defined SYS_BEOS || defined SYS_SOLARIS +#ifdef HAVE_VASPRINTF + vasprintf( &psz_str, psz_format, ap ); +#else psz_str = (char*) malloc( strlen(psz_format) + INTF_MAX_MSG_SIZE ); vsprintf( psz_str, psz_format, ap ); -#else - vasprintf( &psz_str, psz_format, ap ); #endif if( psz_str == NULL ) { @@ -448,11 +448,11 @@ static void QueueDbgMsg(intf_msg_t *p_msg, char *psz_file, char *psz_function, /* * Convert message to string */ -#if defined SYS_BEOS || defined SYS_SOLARIS +#ifdef HAVE_VASPRINTF + vasprintf( &psz_str, psz_format, ap ); +#else psz_str = (char*) malloc( INTF_MAX_MSG_SIZE ); vsprintf( psz_str, psz_format, ap ); -#else - vasprintf( &psz_str, psz_format, ap ); #endif if( psz_str == NULL ) { @@ -624,3 +624,4 @@ static void PrintMsg( intf_msg_item_t *p_msg ) } #endif +