aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend/file.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2016-04-10 21:29:42 +0200
committerJakob Unterwurzacher2016-04-10 21:31:15 +0200
commitbd5405189eb27d463e25c43691b19dbdf174d3a8 (patch)
treea78d909a5fac9b3c642ea5c1a715a08bffa54965 /internal/fusefrontend/file.go
parentbd1f17ca9f210b318e28d7ed233698b950d564b8 (diff)
Fix "go tool vet -shadow=true" warnings
Among those one real bug.
Diffstat (limited to 'internal/fusefrontend/file.go')
-rw-r--r--internal/fusefrontend/file.go3
1 files changed, 2 insertions, 1 deletions
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