diff --git a/cmd/erasure.go b/cmd/erasure.go index 5d60af06d..288a7ee23 100644 --- a/cmd/erasure.go +++ b/cmd/erasure.go @@ -77,10 +77,7 @@ func (e *Erasure) DecodeDataBlocks(data [][]byte) error { if !needsReconstruction { return nil } - if err := e.encoder.ReconstructData(data); err != nil { - return err - } - return nil + return e.encoder.ReconstructData(data) } // DecodeDataAndParityBlocks decodes the given erasure-coded data and verifies it. diff --git a/pkg/event/target/queuestore_test.go b/pkg/event/target/queuestore_test.go index 9f2bcc109..fee1e9b48 100644 --- a/pkg/event/target/queuestore_test.go +++ b/pkg/event/target/queuestore_test.go @@ -43,10 +43,7 @@ func setUpStore(directory string, limit uint16) (Store, error) { // Tear down store func tearDownStore() error { - if err := os.RemoveAll(queueDir); err != nil { - return err - } - return nil + return os.RemoveAll(queueDir) } // TestQueueStorePut - tests for store.Put