summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorharti <harti@FreeBSD.org>2005-02-04 16:53:35 +0000
committerharti <harti@FreeBSD.org>2005-02-04 16:53:35 +0000
commit43632a424ac22e5f43ac97b685dc24cdf1dc3af4 (patch)
tree2c66ff9eaf38e42d602b2b3bfd83cc24b30e4327
parent44af3ae9764173adf195a782e9a44aba443970bc (diff)
downloadFreeBSD-src-43632a424ac22e5f43ac97b685dc24cdf1dc3af4.zip
FreeBSD-src-43632a424ac22e5f43ac97b685dc24cdf1dc3af4.tar.gz
Where the returned line length from Buf_GetAll is not used just pass
a NULL to the function. Delete the now unused local variables. Submitted by: Max Okumoto <okumoto@ucsd.edu>
-rw-r--r--usr.bin/make/for.c3
-rw-r--r--usr.bin/make/parse.c6
2 files changed, 3 insertions, 6 deletions
diff --git a/usr.bin/make/for.c b/usr.bin/make/for.c
index c34ab65..2c0ec05 100644
--- a/usr.bin/make/for.c
+++ b/usr.bin/make/for.c
@@ -253,11 +253,10 @@ ForExec(void *namep, void *argp)
{
char *name = namep;
For *arg = argp;
- size_t len;
Var_Set(arg->var, name, VAR_GLOBAL);
DEBUGF(FOR, ("--- %s = %s\n", arg->var, name));
- Parse_FromString(Var_Subst(arg->var, (char *)Buf_GetAll(arg->buf, &len),
+ Parse_FromString(Var_Subst(arg->var, (char *)Buf_GetAll(arg->buf, NULL),
VAR_GLOBAL, FALSE), arg->lineno);
Var_Delete(arg->var, VAR_GLOBAL);
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index d9856cd..2db0d8a 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -2012,7 +2012,6 @@ ParseSkipLine(int skip, int keep_newline)
{
char *line;
int c, lastc;
- size_t lineLength = 0;
Buffer *buf;
buf = Buf_Init(MAKE_BSIZE);
@@ -2056,7 +2055,7 @@ ParseSkipLine(int skip, int keep_newline)
curFile.lineno++;
Buf_AddByte(buf, (Byte)'\0');
- line = (char *)Buf_GetAll(buf, &lineLength);
+ line = (char *)Buf_GetAll(buf, NULL);
} while (skip == 1 && line[0] != '.');
Buf_Destroy(buf, FALSE);
@@ -2094,7 +2093,6 @@ ParseReadLine(void)
* shell command */
char *line; /* Result */
char *ep; /* to strip trailing blanks */
- size_t lineLength; /* Length of result */
int lineno; /* Saved line # */
semiNL = FALSE;
@@ -2253,7 +2251,7 @@ test_char:
Buf_AddByte(buf, (Byte)lastc);
}
Buf_AddByte(buf, (Byte)'\0');
- line = (char *)Buf_GetAll(buf, &lineLength);
+ line = (char *)Buf_GetAll(buf, NULL);
Buf_Destroy(buf, FALSE);
/*
OpenPOWER on IntegriCloud