Skip to content

Commit

Permalink
Fixed duplicate counts when restoring from disk.
Browse files Browse the repository at this point in the history
  • Loading branch information
allinurl committed May 14, 2024
1 parent b45ab0d commit e1f140e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -1982,6 +1982,7 @@ read_line (GLog *glog, char *line, int *test, uint32_t *cnt, int dry_run) {
uncount_invalid (glog);
return NULL;
}
glog->read++;

return logitem;
}
Expand Down Expand Up @@ -2104,7 +2105,6 @@ read_lines_from_file (FILE *fp, GLog *glog, GJob jobs[2][conf.jobs], int b, char
while ((*s = fgets (jobs[b][k].lines[jobs[b][k].p], LINE_BUFFER, fp)) != NULL) {
#endif
glog->bytes += strlen (jobs[b][k].lines[jobs[b][k].p]);
glog->read++;

if (++(jobs[b][k].p) >= conf.chunk_size)
break; // goto next chunk
Expand Down

0 comments on commit e1f140e

Please sign in to comment.