From: RĂ©mi Duraffort Date: Thu, 31 Jul 2008 15:55:29 +0000 (+0200) Subject: Prefer setenv to putenv (evenmore with local variables). X-Git-Tag: 0.9.0-test3~111 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=d632ffe1a6f5e6cea5dd796105e1708cdb0b3631;p=vlc Prefer setenv to putenv (evenmore with local variables). --- diff --git a/src/libvlc.c b/src/libvlc.c index 17482f6973..411ce92e9b 100644 --- a/src/libvlc.c +++ b/src/libvlc.c @@ -1212,10 +1212,7 @@ static void SetLanguage ( const char *psz_lang ) * the language at runtime under eg. Windows. Beware that this * makes the environment unconsistent when libvlc is unloaded and * should probably be moved to a safer place like vlc.c. */ - static char psz_lcall[20]; - snprintf( psz_lcall, 19, "LC_ALL=%s", psz_lang ); - psz_lcall[19] = '\0'; - putenv( psz_lcall ); + setenv( "LC_ALL", psz_lang, 1 ); #endif setlocale( LC_ALL, psz_lang );