summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/ld-numeric.c8
-rw-r--r--locale/programs/ld-time.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/locale/programs/ld-numeric.c b/locale/programs/ld-numeric.c
index 697ad35bb9..3bf198aba5 100644
--- a/locale/programs/ld-numeric.c
+++ b/locale/programs/ld-numeric.c
@@ -114,7 +114,13 @@ numeric_finish (struct localedef_t *locale, struct charmap_t *charmap)
   /* The decimal point must not be empty.  This is not said explicitly
      in POSIX but ANSI C (ISO/IEC 9899) says in 4.4.2.1 it has to be
      != "".  */
-  if (numeric->decimal_point[0] == '\0' && ! be_quiet && ! nothing)
+  if (numeric->decimal_point == NULL)
+    {
+      error (0, 0, _("%s: field `%s' not defined"),
+	     "LC_NUMERIC", "decimal_point");
+      numeric->decimal_point = ".";
+    }
+  else if (numeric->decimal_point[0] == '\0' && ! be_quiet && ! nothing)
     {
       error (0, 0, _("\
 %s: value for field `%s' must not be the empty string"),
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
index 9ec58f6487..b2c06cca7c 100644
--- a/locale/programs/ld-time.c
+++ b/locale/programs/ld-time.c
@@ -115,7 +115,7 @@ time_startup (struct linereader *lr, struct localedef_t *locale,
     locale->categories[LC_TIME].time =
       (struct locale_time_t *) xcalloc (1, sizeof (struct locale_time_t));
 
-  if (time != NULL)
+  if (lr != NULL)
     {
       lr->translate_strings = 1;
       lr->return_widestr = 1;