rmDocIdVotes(): loop correctly

This commit is contained in:
Ivan Skytte Jørgensen
2016-03-10 23:01:59 +01:00
parent 845117e858
commit 39edc20773

@ -3182,14 +3182,14 @@ void PosdbTable::rmDocIdVotes ( QueryTermInfo *qti ) {
// less than? keep going
if ( *(uint32_t *)(dp+1) <
*(uint32_t *)(recPtr+8) )
continue;
goto endloop2;
// top 4 bytes are equal. check lower single byte then.
if ( *(unsigned char *)(dp) >
(*(unsigned char *)(recPtr+7) & 0xfc ) )
break;
if ( *(unsigned char *)(dp) <
(*(unsigned char *)(recPtr+7) & 0xfc ) )
continue;
goto endloop2;
// . equal! mark it as nuked!
dp[5] = -1;//listGroupNum;
// skip it
@ -3198,7 +3198,8 @@ void PosdbTable::rmDocIdVotes ( QueryTermInfo *qti ) {
break;
}
// if we've exhausted this docid list go to next sublist
if ( dp >= dpEnd ) continue;
if ( dp >= dpEnd )
goto endloop2;
// skip that docid record in our termlist. it MUST have been
// 12 bytes, a docid heading record.
recPtr += 12;
@ -3208,6 +3209,7 @@ void PosdbTable::rmDocIdVotes ( QueryTermInfo *qti ) {
// if we have more posdb recs in this sublist, then keep
// adding our docid votes into the docid list
}
endloop2: ;
// otherwise, advance to next sublist
}