-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wed, 31 Mar 2010, David Cantrell wrote:
On Wed, 31 Mar 2010, Ales Kozumplik wrote:
On 03/31/2010 05:14 PM, David Cantrell wrote:
+ /*
+ * Because currently initrd.img only has got the default English locale
+ * support, pretend for newtInit() it is actually the used LANG so Newt
+ * knows how to compute character widths etc.
+ **/
+ char *lang = strdup(getenv("LANG"));
getenv() can return NULL here, in which case we don't want to strdup() the
result.
Thanks for that catch. Is this better?
char *lang = getenv("LANG");
if (lang) {
lang = strdup(lang);
}
setenv("LANG", LANG_DEFAULT, 1);
newtInit();
unsetenv("LANG");
/* restore the original LANG value */
if (lang) {
setenv("LANG", lang, 1);
free(lang);
}
Looks better. Ack.
Also, make sure you apply this to master and not just f13-branch.
- --
David Cantrell <dcantrell@xxxxxxxxxx>
Red Hat / Honolulu, HI
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
iEYEARECAAYFAkuzenYACgkQ5hsjjIy1VkmdiQCdEAbciM5FhZF08meSyZwqJyZc
iIwAnRK9JvbSZz67Li2JdV9bMt8bNrVT
=+2UZ
-----END PGP SIGNATURE-----
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list