about summary refs log tree commit diff
path: root/locale/programs/locarchive.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-03-25 03:54:03 +0000
committerRoland McGrath <roland@gnu.org>2004-03-25 03:54:03 +0000
commitdb2f05ba83cd9eaae24b30166816e5169bbae2c0 (patch)
tree0e742754c54aafc31d38af146808d06300a65286 /locale/programs/locarchive.c
parent61044c288ab5c7c4687205b0bf136e5358bfe1d1 (diff)
downloadglibc-db2f05ba83cd9eaae24b30166816e5169bbae2c0.tar.gz
glibc-db2f05ba83cd9eaae24b30166816e5169bbae2c0.tar.xz
glibc-db2f05ba83cd9eaae24b30166816e5169bbae2c0.zip
* Makerules ($(common-objpfx)shlib.lds): Don't use \n in rhs of sed
	substitutions; the semicolon terminators are enough for ld anyway.

	* elf/dl-deps.c (_dl_map_object_deps): Use alloca instead of
	dynamically sized auto array in function already using alloca.
	* locale/programs/ld-ctype.c (ctype_output): Likewise.
	* locale/programs/ld-time.c (time_output): Likewise.
	* elf/dl-misc.c (_dl_debug_vdprintf): Use macro instead of const for
	IOV array size.
	* locale/programs/charmap.c (charmap_read): Avoid alloca (or strdupa)
	when also using dynamically-sized auto array.
	* locale/programs/locfile.c (locfile_read): Likewise.
	* locale/programs/repertoire.c (repertoire_read): Likewise.
	* nis/nis_print_group_entry.c (nis_print_group_entry): Likewise.
	* locale/programs/locarchive.c (enlarge_archive): Likewise.
	* posix/annexc.c (check_header): Likewise.

	* iconv/gconv_int.h (norm_add_slashes): Don't handle null SUFFIX.
	strlen ("") gets optimized away just as well.
	* intl/loadmsgcat.c (_nl_init_domain_conv): Update caller.
	* wcsmbs/wcsmbsload.c (__wcsmbs_load_conv): Likewise.
Diffstat (limited to 'locale/programs/locarchive.c')
-rw-r--r--locale/programs/locarchive.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
index e10f236815..1a1c7701d1 100644
--- a/locale/programs/locarchive.c
+++ b/locale/programs/locarchive.c
@@ -238,7 +238,6 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
   size_t prefix_len = output_prefix ? strlen (output_prefix) : 0;
   char archivefname[prefix_len + sizeof (ARCHIVE_NAME)];
   char fname[prefix_len + sizeof (ARCHIVE_NAME) + sizeof (".XXXXXX") - 1];
-  struct oldlocrecent *oldlocrecarray;
 
   if (output_prefix)
     memcpy (archivefname, output_prefix, prefix_len);
@@ -341,9 +340,7 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
 				       + head->locrectab_offset);
 
   /* Sort the old locrec table in order of data position.  */
-  oldlocrecarray = (struct oldlocrecent *)
-		   alloca (head->namehash_size
-			   * sizeof (struct oldlocrecent));
+  struct oldlocrecent oldlocrecarray[head->namehash_size];
   for (cnt = 0, loccnt = 0; cnt < head->namehash_size; ++cnt)
     if (oldnamehashtab[cnt].locrec_offset != 0)
       {