Pull request: all: rm var shadowing, vol. 2

Updates #2803.

Squashed commit of the following:

commit bf7186378164f19ea9e21ec832526792efa2f9c3
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Thu Mar 11 19:48:17 2021 +0300

    all: rm var shadowing, vol. 2
This commit is contained in:
Ainar Garipov
2021-03-11 20:36:54 +03:00
parent dfdbfee4fd
commit 4cf44dd1d4
7 changed files with 31 additions and 20 deletions

View File

@@ -118,8 +118,9 @@ func (l *queryLog) searchFiles(params *searchParams) ([]*logEntry, time.Time, in
// The idea is to make search calls faster so that the UI could handle it and show something
// This behavior can be overridden if "maxFileScanEntries" is set to 0
for total < params.maxFileScanEntries || params.maxFileScanEntries <= 0 {
entry, ts, err := l.readNextEntry(r, params)
var entry *logEntry
var ts int64
entry, ts, err = l.readNextEntry(r, params)
if err == io.EOF {
// there's nothing to read anymore
break