diff --git a/cmd/mtredisalize/changetracker.go b/cmd/mtredisalize/changetracker.go index 53a3c1f..413d4d0 100644 --- a/cmd/mtredisalize/changetracker.go +++ b/cmd/mtredisalize/changetracker.go @@ -41,7 +41,7 @@ func (ct *ChangeTracker) BlockChanged(key []byte) { ct.mutex.Unlock() } -func (ct *ChangeTracker) FlushChanges(url string) (err error) { +func (ct *ChangeTracker) FlushChanges(url string) { var oldChanges map[quantizedXZ]bool ct.mutex.Lock() if len(ct.changes) > 0 { @@ -59,6 +59,7 @@ func (ct *ChangeTracker) FlushChanges(url string) (err error) { changes[i] = change i++ } + var err error var buf bytes.Buffer encoder := json.NewEncoder(&buf) if err = encoder.Encode(changes); err != nil {