X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Finterface%2Fintf_msg.c;h=68c3b6301bd4f9d43bc8f58b6e7cb8ed2e404491;hb=583c6553f6761421260d86bbc21b5b3169c04319;hp=64e454b8d19e02d51cc1b27c9ed3cb04a212265d;hpb=3bb7a5371e29b608e29851b9f1366a12a3505afe;p=vlc diff --git a/src/interface/intf_msg.c b/src/interface/intf_msg.c index 64e454b8d1..68c3b6301b 100644 --- a/src/interface/intf_msg.c +++ b/src/interface/intf_msg.c @@ -5,7 +5,7 @@ ***************************************************************************** * Copyright (C) 1998, 1999, 2000 VideoLAN * - * Authors: + * Authors: Vincent Seguin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -392,7 +392,6 @@ static void QueueMsg( intf_msg_t *p_msg, int i_type, char *psz_format, va_list a vasprintf( &psz_str, psz_format, ap ); #else psz_str = (char*) malloc( strlen(psz_format) + INTF_MAX_MSG_SIZE ); - vsprintf( psz_str, psz_format, ap ); #endif if( psz_str == NULL ) { @@ -402,6 +401,10 @@ static void QueueMsg( intf_msg_t *p_msg, int i_type, char *psz_format, va_list a fprintf(stderr, "\n" ); exit( errno ); } +#ifdef HAVE_VASPRINTF +#else + vsprintf( psz_str, psz_format, ap ); +#endif #ifdef INTF_MSG_QUEUE /*...................................... queue mode ...*/ vlc_mutex_lock( &p_msg->lock ); /* get lock */ @@ -421,7 +424,7 @@ static void QueueMsg( intf_msg_t *p_msg, int i_type, char *psz_format, va_list a p_msg_item->i_type = i_type; p_msg_item->psz_msg = psz_str; #ifdef DEBUG - p_msg_item->date = mdate(); + p_msg_item->date = mdate(); #endif #ifdef INTF_MSG_QUEUE /*......................................... queue mode */