summaryrefslogtreecommitdiff
path: root/usr.bin/make/cond.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-12-16 16:52:12 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-12-16 16:52:12 +0000
commit89a71bad14daa17b95d5d5d0bd2e18578197640c (patch)
tree0a77318bc3362e49a335b17bd20883019512ca4e /usr.bin/make/cond.c
parent296ccc19536f9d5d7d391200ec996df08ccac23f (diff)
Remove unneeded extraneous zeros at the end of buffers.
Actually, one of these needs to be there, because of two bugs in cond.c
Diffstat (limited to 'usr.bin/make/cond.c')
-rw-r--r--usr.bin/make/cond.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/make/cond.c b/usr.bin/make/cond.c
index 10be8276770..e4efad2f04d 100644
--- a/usr.bin/make/cond.c
+++ b/usr.bin/make/cond.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cond.c,v 1.8 1999/12/16 16:41:41 espie Exp $ */
+/* $OpenBSD: cond.c,v 1.9 1999/12/16 16:52:11 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.8 1999/12/16 16:41:41 espie Exp $";
+static char rcsid[] = "$OpenBSD: cond.c,v 1.9 1999/12/16 16:52:11 espie Exp $";
#endif
#endif /* not lint */
@@ -245,6 +245,7 @@ CondGetArg(linePtr, argPtr, func, parens)
}
}
+ /* XXX */
Buf_AddChar(buf, '\0');
*argPtr = Buf_Retrieve(buf);
argLen = Buf_Size(buf);
@@ -556,9 +557,7 @@ CondToken(doEval)
condExpr++)
Buf_AddChar(buf, *condExpr);
- Buf_AddChar(buf, '\0');
lhs = Buf_Retrieve(buf);
- varSpecLen = Buf_Size(buf);
Buf_Destroy(buf, FALSE);
doFree = TRUE;
@@ -653,8 +652,6 @@ do_string_compare:
}
}
- Buf_AddChar(buf, '\0');
-
string = Buf_Retrieve(buf);
Buf_Destroy(buf, FALSE);