]> git.sesse.net Git - vlc/commitdiff
Prefer setenv to putenv (evenmore with local variables).
authorRémi Duraffort <ivoire@videolan.org>
Thu, 31 Jul 2008 15:55:29 +0000 (17:55 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Thu, 31 Jul 2008 15:55:29 +0000 (17:55 +0200)
src/libvlc.c

index 17482f6973d3152dcfa79e200f5f5ef3f25eb284..411ce92e9bf3ae8f68582aca880d705e50806c7d 100644 (file)
@@ -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 );