Setting a variable to the same value twice doesn't actually make it

more likely to have the right value.  Remove superfluous assignments.

Found by:	LLVM/Clang Static Checker
This commit is contained in:
cperciva 2008-08-04 06:39:52 +00:00
parent bfce43df58
commit 55239b4ba7
3 changed files with 1 additions and 4 deletions

View File

@ -42,7 +42,7 @@ unargv(int argc, char *argv[])
int i;
char *cp;
for (hlong = 0, i = 0, hlong = 0; i < argc; i++)
for (i = 0, hlong = 0; i < argc; i++)
hlong += strlen(argv[i]) + 2;
if(hlong == 0)

View File

@ -153,7 +153,6 @@ getfile(void)
p++;
}
ep = getptrs(elem);
p = curline;
do {
if (flags & ONEPERLINE) {
*ep = curline;

View File

@ -142,7 +142,6 @@ set_first_derives()
}
}
vrow += varsetsize;
rrow += rulesetsize;
}
@ -173,7 +172,6 @@ int n;
int itemno;
rulesetsize = WORDSIZE(nrules);
rsp = ruleset;
rsend = ruleset + rulesetsize;
for (rsp = ruleset; rsp < rsend; rsp++)
*rsp = 0;