Skip to content

Commit ee3cdbc

Browse files
authored
fix(lint): remove redundant check (#2)
Remove a check that is unreachable because uint64 can never be < 0. The intended effect is already done by the underlying journal, which will return a non-nil err in the event of an error. Signed-off-by: Erik Swanson <erik@retailnext.net>
1 parent 523ceb3 commit ee3cdbc

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

reader.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ import (
2727
"fmt"
2828
"io"
2929
"os"
30-
"syscall"
3130
"time"
3231

3332
"github.com/coreos/go-systemd/v22/sdjournal"
@@ -174,9 +173,6 @@ func (r *Reader) Next(cancel canceler) (*sdjournal.JournalEntry, error) {
174173
}
175174

176175
switch {
177-
// error while reading next entry
178-
case c < 0:
179-
return nil, fmt.Errorf("error while reading next entry %+v", syscall.Errno(-c))
180176
// no new entry, so wait
181177
case c == 0:
182178
hasNewEntry, err := r.checkForNewEvents()

0 commit comments

Comments
 (0)