summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--locale/programs/locale.c37
-rw-r--r--malloc/malloc.c2
3 files changed, 23 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c84f14c58..8f95162e1f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-04-12  Ulrich Drepper  <drepper@redhat.com>
 
+	* locale/programs/locale.c (show_info): Don't try to look into
+	data for LC_ALL (there is none).
+
 	* malloc/malloc.c (cALLOc): Clear only what the user asked for and
 	avoid writing over boundary.
 	Patch by Greg McGary <gkm@eng.ascend.com>.
diff --git a/locale/programs/locale.c b/locale/programs/locale.c
index 06900a802a..261f7c729b 100644
--- a/locale/programs/locale.c
+++ b/locale/programs/locale.c
@@ -669,31 +669,32 @@ show_info (const char *name)
     }
 
   for (cat_no = 0; cat_no < NCATEGORIES; ++cat_no)
-    {
-      size_t item_no;
-
-      if (strcmp (name, category[cat_no].name) == 0)
-	/* Print the whole category.  */
-	{
-	  if (show_category_name != 0)
-	    puts (category[cat_no].name);
-
-	  for (item_no = 0; item_no < category[cat_no].number; ++item_no)
-	    print_item (&category[cat_no].item_desc[item_no]);
-
-	  return;
-	}
+    if (cat_no != LC_ALL)
+      {
+	size_t item_no;
 
-      for (item_no = 0; item_no < category[cat_no].number; ++item_no)
-	if (strcmp (name, category[cat_no].item_desc[item_no].name) == 0)
+	if (strcmp (name, category[cat_no].name) == 0)
+	  /* Print the whole category.  */
 	  {
 	    if (show_category_name != 0)
 	      puts (category[cat_no].name);
 
-	    print_item (&category[cat_no].item_desc[item_no]);
+	    for (item_no = 0; item_no < category[cat_no].number; ++item_no)
+	      print_item (&category[cat_no].item_desc[item_no]);
+
 	    return;
 	  }
-    }
+
+	for (item_no = 0; item_no < category[cat_no].number; ++item_no)
+	  if (strcmp (name, category[cat_no].item_desc[item_no].name) == 0)
+	    {
+	      if (show_category_name != 0)
+		puts (category[cat_no].name);
+
+	      print_item (&category[cat_no].item_desc[item_no]);
+	      return;
+	    }
+      }
 
   /* The name is not a standard one.
      For testing and perhaps advanced use allow some more symbols.  */
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 2351963838..93feb07ecd 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -3738,7 +3738,7 @@ Void_t* cALLOc(n, elem_size) size_t n; size_t elem_size;
   }
 #endif
 
-  MALLOC_ZERO(mem, cs);
+  MALLOC_ZERO(mem, sz);
   return mem;
 }