summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2000-12-16 02:14:37 +0000
committerdes <des@FreeBSD.org>2000-12-16 02:14:37 +0000
commit8c8c3b5c0efc6e59ada7094c84ab26bd414ccd6c (patch)
tree667c55d8f2f7ae97325625ccd9e532e11b885764 /usr.bin/make
parent6cfa91b7f05f6db8bfa334e1da85218b7394256a (diff)
downloadFreeBSD-src-8c8c3b5c0efc6e59ada7094c84ab26bd414ccd6c.zip
FreeBSD-src-8c8c3b5c0efc6e59ada7094c84ab26bd414ccd6c.tar.gz
Fix a bug introduced in rev. 1.17: initialize variables before use, not after.
Rev. 1.17 was "Obtained from NetBSD", but is significantly different from the equivalent NetBSD revision (rev. 1.30), which does not have this bug.
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/arch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c
index b07a92e..a3a2a6a 100644
--- a/usr.bin/make/arch.c
+++ b/usr.bin/make/arch.c
@@ -1112,8 +1112,8 @@ Arch_FindLib (gn, path)
char *libName; /* file name for archive */
size_t sz;
- libName = (char *)emalloc(sz);
sz = strlen(gn->name) + 4;
+ libName = (char *)emalloc(sz);
snprintf(libName, sz, "lib%s.a", &gn->name[2]);
gn->path = Dir_FindFile (libName, path);
OpenPOWER on IntegriCloud