aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/file_holes.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-09-25 19:48:21 +0200
committerJakob Unterwurzacher2016-09-25 19:48:21 +0200
commit5f4b16c00f2475a8efd0ae0d4d4e26f92b563dc0 (patch)
tree5b9a65d94c3cc58c032e731ea4cb776947b30ebd /internal/fusefrontend/file_holes.go
parent166ba74a053898a52ff2e48125c1df97f35a85fd (diff)
Implement changes proposed by gosimple.
Also delete the unused "dirIVNameStruct", found by deadcode.
Diffstat (limited to 'internal/fusefrontend/file_holes.go')
-rw-r--r--internal/fusefrontend/file_holes.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/internal/fusefrontend/file_holes.go b/internal/fusefrontend/file_holes.go
index 1d9a5fb..34f702f 100644
--- a/internal/fusefrontend/file_holes.go
+++ b/internal/fusefrontend/file_holes.go
@@ -12,10 +12,7 @@ import (
func (f *file) createsHole(plainSize uint64, off int64) bool {
nextBlock := f.contentEnc.PlainOffToBlockNo(plainSize)
targetBlock := f.contentEnc.PlainOffToBlockNo(uint64(off))
- if targetBlock > nextBlock {
- return true
- }
- return false
+ return targetBlock > nextBlock
}
// Zero-pad the file of size plainSize to the next block boundary