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 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'internal/fusefrontend/file_allocate_truncate.go') 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 } -- cgit v1.2.3