diff options
Diffstat (limited to 'usr.bin/make')
-rw-r--r-- | usr.bin/make/cond.c | 9 | ||||
-rw-r--r-- | usr.bin/make/parse.c | 9 | ||||
-rw-r--r-- | usr.bin/make/var.c | 10 |
3 files changed, 8 insertions, 20 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); diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c index 80b8383ef70..ff03a7a99f9 100644 --- a/usr.bin/make/parse.c +++ b/usr.bin/make/parse.c @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.c,v 1.27 1999/12/16 16:41:42 espie Exp $ */ +/* $OpenBSD: parse.c,v 1.28 1999/12/16 16:52:11 espie Exp $ */ /* $NetBSD: parse.c,v 1.29 1997/03/10 21:20:04 christos Exp $ */ /* @@ -43,7 +43,7 @@ #if 0 static char sccsid[] = "@(#)parse.c 8.3 (Berkeley) 3/19/94"; #else -static char rcsid[] = "$OpenBSD: parse.c,v 1.27 1999/12/16 16:41:42 espie Exp $"; +static char rcsid[] = "$OpenBSD: parse.c,v 1.28 1999/12/16 16:52:11 espie Exp $"; #endif #endif /* not lint */ @@ -2130,7 +2130,6 @@ ParseSkipLine(skip) lastc = c; } - Buf_AddChar(buf, '\0'); line = Buf_Retrieve(buf); lineno++; /* allow for non-newline terminated lines while skipping */ @@ -2336,10 +2335,8 @@ test_char: line_read: lineno++; - if (lastc != '\0') { + if (lastc != '\0') Buf_AddChar(buf, lastc); - } - Buf_AddChar(buf, '\0'); line = Buf_Retrieve(buf); Buf_Destroy(buf, FALSE); diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c index 01faa29604f..afad7b4f554 100644 --- a/usr.bin/make/var.c +++ b/usr.bin/make/var.c @@ -1,4 +1,4 @@ -/* $OpenBSD: var.c,v 1.21 1999/12/16 16:41:42 espie Exp $ */ +/* $OpenBSD: var.c,v 1.22 1999/12/16 16:52:11 espie Exp $ */ /* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */ /* @@ -70,7 +70,7 @@ #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -static char rcsid[] = "$OpenBSD: var.c,v 1.21 1999/12/16 16:41:42 espie Exp $"; +static char rcsid[] = "$OpenBSD: var.c,v 1.22 1999/12/16 16:52:11 espie Exp $"; #endif #endif /* not lint */ @@ -1278,7 +1278,6 @@ VarModify (str, modProc, datum) free(as); free(av); - Buf_AddChar(buf, '\0'); str = Buf_Retrieve(buf); Buf_Destroy(buf, FALSE); return (str); @@ -1369,8 +1368,6 @@ VarGetPattern(ctxt, err, tstr, delim, flags, length, pattern) Buf_AddChar(buf, *cp); } - Buf_AddChar(buf, '\0'); - if (*cp != delim) { *tstr = cp; *length = 0; @@ -1380,7 +1377,6 @@ VarGetPattern(ctxt, err, tstr, delim, flags, length, pattern) *tstr = ++cp; cp = Buf_Retrieve(buf); *length = Buf_Size(buf); - *length -= 1; /* Don't count the NULL */ Buf_Destroy(buf, FALSE); return cp; } @@ -1414,7 +1410,6 @@ VarQuote(str) Buf_AddChar(buf, '\\'); Buf_AddChar(buf, *str); } - Buf_AddChar(buf, '\0'); str = Buf_Retrieve(buf); Buf_Destroy(buf, FALSE); return str; @@ -2257,7 +2252,6 @@ Var_Subst (var, str, ctxt, undefErr) } } - Buf_AddChar(buf, '\0'); str = Buf_Retrieve(buf); Buf_Destroy(buf, FALSE); return (str); |