summaryrefslogtreecommitdiff
path: root/usr.bin/make/cond.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-12-16 16:41:43 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-12-16 16:41:43 +0000
commit187eaef221933174b3243421f178461acc5bcc8f (patch)
tree6fc825dbe4e171a09ee446ede723d87098232bd8 /usr.bin/make/cond.c
parente0e493a9c8a6bc69440e9a2e1dae99bad58ef80b (diff)
Split Buf_GetAll into Buf_Retrieve/Buf_Size.
(idiotic to retrieve size every time when it's used half the time)
Diffstat (limited to 'usr.bin/make/cond.c')
-rw-r--r--usr.bin/make/cond.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c
index 562e6b73d8d..10be8276770 100644
--- a/usr.bin/make/cond.c
+++ b/usr.bin/make/cond.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cond.c,v 1.7 1999/12/09 18:18:24 espie Exp $ */
+/* $OpenBSD: cond.c,v 1.8 1999/12/16 16:41:41 espie Exp $ */
/* $NetBSD: cond.c,v 1.7 1996/11/06 17:59:02 christos Exp $ */
/*
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)cond.c 8.2 (Berkeley) 1/2/94";
#else
-static char rcsid[] = "$OpenBSD: cond.c,v 1.7 1999/12/09 18:18:24 espie Exp $";
+static char rcsid[] = "$OpenBSD: cond.c,v 1.8 1999/12/16 16:41:41 espie Exp $";
#endif
#endif /* not lint */
@@ -246,7 +246,8 @@ CondGetArg(linePtr, argPtr, func, parens)
}
Buf_AddChar(buf, '\0');
- *argPtr = Buf_GetAll(buf, &argLen);
+ *argPtr = Buf_Retrieve(buf);
+ argLen = Buf_Size(buf);
Buf_Destroy(buf, FALSE);
while (*cp == ' ' || *cp == '\t') {
@@ -556,7 +557,8 @@ CondToken(doEval)
Buf_AddChar(buf, *condExpr);
Buf_AddChar(buf, '\0');
- lhs = Buf_GetAll(buf, &varSpecLen);
+ lhs = Buf_Retrieve(buf);
+ varSpecLen = Buf_Size(buf);
Buf_Destroy(buf, FALSE);
doFree = TRUE;
@@ -653,7 +655,7 @@ do_string_compare:
Buf_AddChar(buf, '\0');
- string = Buf_GetAll(buf, NULL);
+ string = Buf_Retrieve(buf);
Buf_Destroy(buf, FALSE);
if (DEBUG(COND)) {