Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3824 from ipfs/fix/govet/some-error
Browse files Browse the repository at this point in the history
fix: multiple govet warnings
  • Loading branch information
whyrusleeping authored Mar 24, 2017
2 parents 5e8347c + 8bf6483 commit 12d16cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions mod/dagmodifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,15 +336,18 @@ func (dm *DagModifier) readPrep() error {
ctx, cancel := context.WithCancel(dm.ctx)
dr, err := uio.NewDagReader(ctx, dm.curNode, dm.dagserv)
if err != nil {
cancel()
return err
}

i, err := dr.Seek(int64(dm.curWrOff), os.SEEK_SET)
if err != nil {
cancel()
return err
}

if i != int64(dm.curWrOff) {
cancel()
return ErrSeekFail
}

Expand Down

0 comments on commit 12d16cb

Please sign in to comment.