aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/make/suff.c
diff options
context:
space:
mode:
authorHartmut Brandt <harti@FreeBSD.org>2005-05-12 15:20:03 +0000
committerHartmut Brandt <harti@FreeBSD.org>2005-05-12 15:20:03 +0000
commit46180c9f740dd2b08788f092cf4a91b45254d3e3 (patch)
tree1cfa932602155909caac24d4ab4aec4e236d291e /usr.bin/make/suff.c
parent7ea02fbf54e2e90cc8ed408c41eb0f69b4b6a5c2 (diff)
Notes
Diffstat (limited to 'usr.bin/make/suff.c')
-rw-r--r--usr.bin/make/suff.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index 4ef59b6968467..75bae20826099 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -1503,15 +1503,15 @@ SuffFindArchiveDeps(GNode *gn, Lst *slst)
{
char *eoarch; /* End of archive portion */
char *eoname; /* End of member portion */
+ char *name; /* Start of member's name */
+ char *p1;
GNode *mem; /* Node for member */
- /* Variables to be copied from the member node */
- static char *const copy[] = {
+ Suff *ms; /* Suffix descriptor for member */
+
+ static const char *copy[] = {
TARGET, /* Must be first */
PREFIX, /* Must be second */
};
- int i; /* Index into copy and vals */
- Suff *ms; /* Suffix descriptor for member */
- char *name; /* Start of member's name */
/*
* The node is an archive(member) pair. so we must find a
@@ -1547,11 +1547,10 @@ SuffFindArchiveDeps(GNode *gn, Lst *slst)
/*
* Copy in the variables from the member node to this one.
*/
- for (i = (sizeof(copy) / sizeof(copy[0]))-1; i >= 0; i--) {
- char *p1;
- Var_Set(copy[i], Var_Value(copy[i], mem, &p1), gn);
- free(p1);
- }
+ Var_Set(copy[1], Var_Value(copy[1], mem, &p1), gn);
+ free(p1);
+ Var_Set(copy[0], Var_Value(copy[0], mem, &p1), gn);
+ free(p1);
ms = mem->suffix;
if (ms == NULL) {
@@ -1563,7 +1562,6 @@ SuffFindArchiveDeps(GNode *gn, Lst *slst)
ms = suffNull;
}
-
/*
* Set the other two local variables required for this target.
*/