Skip to content

Commit

Permalink
[cleanup] pkg: Remove ineffectual assignments.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaq committed Mar 31, 2020
1 parent 0234616 commit 31f0eaa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions pkg/cli/term/reader_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ func readEvent(rd byteReaderWithTimeout) (event Event, err error) {
func() rune {
r, e := readRune(rd, keySeqTimeout)
if e != nil {
if e == errTimeout {
e = nil
}
return runeEndOfSeq
}
currentSeq += string(r)
Expand Down
3 changes: 2 additions & 1 deletion pkg/store/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ func (s *dbStore) PrevCmd(upto int, prefix string) (Cmd, error) {
c := b.Cursor()
p := []byte(prefix)

k, v := c.Seek(marshalSeq(uint64(upto)))
var v []byte
k, _ := c.Seek(marshalSeq(uint64(upto)))
if k == nil { // upto > LAST
k, v = c.Last()
if k == nil {
Expand Down

0 comments on commit 31f0eaa

Please sign in to comment.