summaryrefslogtreecommitdiff
path: root/remake.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-05-26 16:53:17 -0400
committerPaul Smith <psmith@gnu.org>2013-05-26 16:53:17 -0400
commitdc922e3f4c442255ba8deb84c9300aa7e3a6108c (patch)
tree781bb19957361377cbe88381e462d544fbff827d /remake.c
parentc11024b3b3532ef7eb80df7d55c8b2fcdc20ce93 (diff)
downloadgunmake-dc922e3f4c442255ba8deb84c9300aa7e3a6108c.tar.gz
[SV #38442] Add library names to the string cache.
Diffstat (limited to 'remake.c')
-rw-r--r--remake.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/remake.c b/remake.c
index f56a856..06e47bc 100644
--- a/remake.c
+++ b/remake.c
@@ -1256,7 +1256,7 @@ f_mtime (struct file *file, int search)
arlen = strlen (arfile->hname);
memlen = strlen (memname);
- name = xmalloc (arlen + 1 + memlen + 2);
+ name = alloca (arlen + 1 + memlen + 2);
memcpy (name, arfile->hname, arlen);
name[arlen] = '(';
memcpy (name + arlen + 1, memname, memlen);
@@ -1266,9 +1266,9 @@ f_mtime (struct file *file, int search)
/* If the archive was found with GPATH, make the change permanent;
otherwise defer it until later. */
if (arfile->name == arfile->hname)
- rename_file (file, name);
+ rename_file (file, strcache_add (name));
else
- rehash_file (file, name);
+ rehash_file (file, strcache_add (name));
check_renamed (file);
}