From edb3e19cb5543c580261052395d461fa47c7cf58 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sat, 29 Apr 2017 14:50:58 +0200 Subject: fix golint complaints --- internal/fusefrontend/file_allocate_truncate.go | 8 ++++---- internal/fusefrontend/fs.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/fusefrontend') diff --git a/internal/fusefrontend/file_allocate_truncate.go b/internal/fusefrontend/file_allocate_truncate.go index 0e12981..ae3dd41 100644 --- a/internal/fusefrontend/file_allocate_truncate.go +++ b/internal/fusefrontend/file_allocate_truncate.go @@ -187,13 +187,13 @@ func (f *file) truncateGrowFile(oldPlainSz uint64, newPlainSz uint64) fuse.Statu if oldPlainSz > 0 { n1 = f.contentEnc.PlainOffToBlockNo(oldPlainSz - 1) } - newEofOffset := newPlainSz - 1 - n2 := f.contentEnc.PlainOffToBlockNo(newEofOffset) + newEOFOffset := newPlainSz - 1 + n2 := f.contentEnc.PlainOffToBlockNo(newEOFOffset) // The file is grown within one block, no need to pad anything. // Write a single zero to the last byte and let doWrite figure out the RMW. if n1 == n2 { buf := make([]byte, 1) - _, status := f.doWrite(buf, int64(newEofOffset)) + _, status := f.doWrite(buf, int64(newEOFOffset)) return status } // The truncate creates at least one new block. @@ -224,6 +224,6 @@ func (f *file) truncateGrowFile(oldPlainSz uint64, newPlainSz uint64) fuse.Statu // The new size is NOT aligned, so we need to write a partial block. // Write a single zero to the last byte and let doWrite figure it out. buf := make([]byte, 1) - _, status := f.doWrite(buf, int64(newEofOffset)) + _, status := f.doWrite(buf, int64(newEOFOffset)) return status } diff --git a/internal/fusefrontend/fs.go b/internal/fusefrontend/fs.go index 4aa4ffd..b38e362 100644 --- a/internal/fusefrontend/fs.go +++ b/internal/fusefrontend/fs.go @@ -45,7 +45,7 @@ func NewFS(args Args) *FS { nameTransform := nametransform.New(cryptoCore.EMECipher, args.LongNames, args.Raw64) if args.SerializeReads { - serialize_reads.Init() + serialize_reads.InitSerializer() } return &FS{ -- cgit v1.2.3