From 8ee595dd484919b98bd9908900fbece2585a334d Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Thu, 19 Aug 2021 08:00:44 +0200 Subject: Fix issues found by "go vet" Issues were: # github.com/rfjakob/gocryptfs/contrib/findholes/holes contrib/findholes/holes/holes.go:136:2: unreachable code # github.com/rfjakob/gocryptfs/tests/root_test_test tests/root_test/root_test.go:139:2: unreachable code Also make sure we actually run "go vet" against the whole codebase. --- contrib/findholes/holes/holes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib/findholes/holes') diff --git a/contrib/findholes/holes/holes.go b/contrib/findholes/holes/holes.go index 7d77ae1..307c624 100644 --- a/contrib/findholes/holes/holes.go +++ b/contrib/findholes/holes/holes.go @@ -121,7 +121,7 @@ func Find(fd int) (segments []Segment, err error) { if err == syscall.ENXIO { segments = append(segments, Segment{totalSize, SegmentEOF}) - return segments, nil + break } if err != nil { return nil, err @@ -136,7 +136,7 @@ func Find(fd int) (segments []Segment, err error) { return segments, nil } -// Verify the gives `segments` using a full bytewise file scan +// Verify `segments` using a full bytewise file scan func Verify(fd int, segments []Segment) (err error) { last := segments[len(segments)-1] if last.Type != SegmentEOF { -- cgit v1.2.3