fix -d from lucho
This commit is contained in:
parent
53e2a4c62e
commit
3e1960ce9e
1 changed files with 2 additions and 2 deletions
|
|
@ -474,7 +474,7 @@ sha1check(u8int *score, uchar *buf, int n)
|
||||||
{
|
{
|
||||||
char score2[VtScoreSize];
|
char score2[VtScoreSize];
|
||||||
|
|
||||||
sha1(buf, n, score, nil);
|
sha1(buf, n, score2, nil);
|
||||||
if(memcmp(score, score2, VtScoreSize) == 0)
|
if(memcmp(score, score2, VtScoreSize) == 0)
|
||||||
return 0;
|
return 0;
|
||||||
return -1;
|
return -1;
|
||||||
|
|
@ -567,7 +567,7 @@ if(0) fprint(2, "vacData: %s: %ld\n", lname, block);
|
||||||
warn("file truncated due to read error: %s: %r", lname);
|
warn("file truncated due to read error: %s: %r", lname);
|
||||||
if(n <= 0)
|
if(n <= 0)
|
||||||
break;
|
break;
|
||||||
if(vf != nil && vacfileblockscore(vf, block, score) && sha1check(score, buf, n)>=0) {
|
if(vf != nil && vacfileblockscore(vf, block, score)>=0 && sha1check(score, buf, n)>=0) {
|
||||||
stats.sdata++;
|
stats.sdata++;
|
||||||
sinkwritescore(sink, score, n);
|
sinkwritescore(sink, score, n);
|
||||||
} else
|
} else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue