]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/gettext/gettext.c (grub_gettext_init_ext): Exit if local is
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 3 Nov 2011 15:04:26 +0000 (16:04 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Thu, 3 Nov 2011 15:04:26 +0000 (16:04 +0100)
NULL.

ChangeLog
grub-core/gettext/gettext.c

index 81f5d942da7cfcb9aa8f29133be92fc329077253..ceca3fddbde5fba871ca4df4c4726b79a1789654 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-03  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/gettext/gettext.c (grub_gettext_init_ext): Exit if local is
+       NULL.
+
 2011-11-03  crocket <crockabiscuit@gmail.com>
 
        * util/grub.d/10_linux.in: Add Slackware initrd naming.
index cca8b901fcc253306a9e7205b08f395efa2c440b..8581b1ff3df3ab2ba0684ce2e295ee6bfa85b086 100644 (file)
@@ -296,6 +296,9 @@ grub_gettext_init_ext (const char *locale)
 {
   char *locale_dir;
 
+  if (!locale)
+    return;
+
   locale_dir = grub_env_get ("locale_dir");
   if (locale_dir == NULL)
     {
@@ -370,8 +373,6 @@ grub_cmd_translate (grub_command_t cmd __attribute__ ((unused)),
 
 GRUB_MOD_INIT (gettext)
 {
-  (void) mod;                  /* To stop warning.  */
-
   const char *lang;
 
   lang = grub_env_get ("lang");