From bd5405189eb27d463e25c43691b19dbdf174d3a8 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 10 Apr 2016 21:29:42 +0200 Subject: Fix "go tool vet -shadow=true" warnings Among those one real bug. --- internal/fusefrontend/file.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'internal/fusefrontend/file.go') diff --git a/internal/fusefrontend/file.go b/internal/fusefrontend/file.go index c93c384..0d26329 100644 --- a/internal/fusefrontend/file.go +++ b/internal/fusefrontend/file.go @@ -236,7 +236,8 @@ func (f *file) doWrite(data []byte, off int64) (uint32, fuse.Status) { if b.IsPartial() { // Read o, _ := b.PlaintextRange() - oldData, status := f.doRead(o, f.contentEnc.PlainBS()) + var oldData []byte + oldData, status = f.doRead(o, f.contentEnc.PlainBS()) if status != fuse.OK { toggledlog.Warn.Printf("ino%d fh%d: RMW read failed: %s", f.ino, f.intFd(), status.String()) return written, status -- cgit v1.2.3