diff --git a/cmd/frostfs-adm/internal/modules/morph/initialize.go b/cmd/frostfs-adm/internal/modules/morph/initialize.go index 2f47216539..494ad52964 100644 --- a/cmd/frostfs-adm/internal/modules/morph/initialize.go +++ b/cmd/frostfs-adm/internal/modules/morph/initialize.go @@ -91,11 +91,7 @@ func initializeSideChainCmd(cmd *cobra.Command, _ []string) error { } cmd.Println("Stage 7: set addresses in NNS.") - if err := initCtx.setNNS(); err != nil { - return err - } - - return nil + return initCtx.setNNS() } func (c *initializeContext) close() { diff --git a/pkg/services/object/get/assembler.go b/pkg/services/object/get/assembler.go index 4ae1981b18..7a3023c74d 100644 --- a/pkg/services/object/get/assembler.go +++ b/pkg/services/object/get/assembler.go @@ -159,10 +159,7 @@ func (a *assembler) assembleObjectByChildrenList(ctx context.Context, childrenID if err := a.assemblePayloadInReverse(ctx, writer, childrenIDs[len(childrenIDs)-1]); err != nil { return err } - if err := writer.WriteChunk(ctx, a.parentObject.Payload()); err != nil { - return err - } - return nil + return writer.WriteChunk(ctx, a.parentObject.Payload()) } func (a *assembler) assemleObjectByPreviousIDInReverse(ctx context.Context, prevID oid.ID, writer ObjectWriter) error { diff --git a/pkg/services/object/get/v2/get_forwarder.go b/pkg/services/object/get/v2/get_forwarder.go index 3677327c0e..b0de3a55b5 100644 --- a/pkg/services/object/get/v2/get_forwarder.go +++ b/pkg/services/object/get/v2/get_forwarder.go @@ -74,10 +74,7 @@ func (f *getRequestForwarder) verifyResponse(resp *objectV2.GetResponse, pubkey return fmt.Errorf("response verification failed: %w", err) } - if err := checkStatus(resp.GetMetaHeader().GetStatus()); err != nil { - return err - } - return nil + return checkStatus(resp.GetMetaHeader().GetStatus()) } func (f *getRequestForwarder) writeHeader(ctx context.Context, v *objectV2.GetObjectPartInit) error { diff --git a/pkg/services/object/get/v2/get_range_forwarder.go b/pkg/services/object/get/v2/get_range_forwarder.go index 06b65fb50d..91d52a593b 100644 --- a/pkg/services/object/get/v2/get_range_forwarder.go +++ b/pkg/services/object/get/v2/get_range_forwarder.go @@ -76,10 +76,7 @@ func (f *getRangeRequestForwarder) verifyResponse(resp *objectV2.GetRangeRespons return fmt.Errorf("could not verify %T: %w", resp, err) } - if err := checkStatus(resp.GetMetaHeader().GetStatus()); err != nil { - return err - } - return nil + return checkStatus(resp.GetMetaHeader().GetStatus()) } func (f *getRangeRequestForwarder) openStream(ctx context.Context, addr network.Address, c client.MultiAddressClient) (*rpc.ObjectRangeResponseReader, error) { diff --git a/pkg/services/object/get/v2/head_forwarder.go b/pkg/services/object/get/v2/head_forwarder.go index f02ef81bbd..aab5046e49 100644 --- a/pkg/services/object/get/v2/head_forwarder.go +++ b/pkg/services/object/get/v2/head_forwarder.go @@ -176,8 +176,5 @@ func (f *headRequestForwarder) verifyResponse(headResp *objectV2.HeadResponse, p return fmt.Errorf("response verification failed: %w", err) } - if err := checkStatus(f.Response.GetMetaHeader().GetStatus()); err != nil { - return err - } - return nil + return checkStatus(f.Response.GetMetaHeader().GetStatus()) }