mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-21 07:45:07 +00:00
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>
This commit is contained in:
parent
f4dd241033
commit
2e0af0312e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=141291
|
@ -253,11 +253,10 @@ ForExec(void *namep, void *argp)
|
||||||
{
|
{
|
||||||
char *name = namep;
|
char *name = namep;
|
||||||
For *arg = argp;
|
For *arg = argp;
|
||||||
size_t len;
|
|
||||||
|
|
||||||
Var_Set(arg->var, name, VAR_GLOBAL);
|
Var_Set(arg->var, name, VAR_GLOBAL);
|
||||||
DEBUGF(FOR, ("--- %s = %s\n", arg->var, name));
|
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_GLOBAL, FALSE), arg->lineno);
|
||||||
Var_Delete(arg->var, VAR_GLOBAL);
|
Var_Delete(arg->var, VAR_GLOBAL);
|
||||||
|
|
||||||
|
|
|
@ -2012,7 +2012,6 @@ ParseSkipLine(int skip, int keep_newline)
|
||||||
{
|
{
|
||||||
char *line;
|
char *line;
|
||||||
int c, lastc;
|
int c, lastc;
|
||||||
size_t lineLength = 0;
|
|
||||||
Buffer *buf;
|
Buffer *buf;
|
||||||
|
|
||||||
buf = Buf_Init(MAKE_BSIZE);
|
buf = Buf_Init(MAKE_BSIZE);
|
||||||
|
@ -2056,7 +2055,7 @@ ParseSkipLine(int skip, int keep_newline)
|
||||||
|
|
||||||
curFile.lineno++;
|
curFile.lineno++;
|
||||||
Buf_AddByte(buf, (Byte)'\0');
|
Buf_AddByte(buf, (Byte)'\0');
|
||||||
line = (char *)Buf_GetAll(buf, &lineLength);
|
line = (char *)Buf_GetAll(buf, NULL);
|
||||||
} while (skip == 1 && line[0] != '.');
|
} while (skip == 1 && line[0] != '.');
|
||||||
|
|
||||||
Buf_Destroy(buf, FALSE);
|
Buf_Destroy(buf, FALSE);
|
||||||
|
@ -2094,7 +2093,6 @@ ParseReadLine(void)
|
||||||
* shell command */
|
* shell command */
|
||||||
char *line; /* Result */
|
char *line; /* Result */
|
||||||
char *ep; /* to strip trailing blanks */
|
char *ep; /* to strip trailing blanks */
|
||||||
size_t lineLength; /* Length of result */
|
|
||||||
int lineno; /* Saved line # */
|
int lineno; /* Saved line # */
|
||||||
|
|
||||||
semiNL = FALSE;
|
semiNL = FALSE;
|
||||||
|
@ -2253,7 +2251,7 @@ ParseReadLine(void)
|
||||||
Buf_AddByte(buf, (Byte)lastc);
|
Buf_AddByte(buf, (Byte)lastc);
|
||||||
}
|
}
|
||||||
Buf_AddByte(buf, (Byte)'\0');
|
Buf_AddByte(buf, (Byte)'\0');
|
||||||
line = (char *)Buf_GetAll(buf, &lineLength);
|
line = (char *)Buf_GetAll(buf, NULL);
|
||||||
Buf_Destroy(buf, FALSE);
|
Buf_Destroy(buf, FALSE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue