Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
[#243] Fix ineffassign linter errors
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Vanin <[email protected]>
  • Loading branch information
alexvanin committed Jan 12, 2021
1 parent 8a82400 commit 43c579f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion v2/accounting/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (d *Decimal) StableMarshal(buf []byte) ([]byte, error) {

offset += n

n, err = protoutil.UInt32Marshal(decimalPrecisionField, buf[offset:], d.prec)
_, err = protoutil.UInt32Marshal(decimalPrecisionField, buf[offset:], d.prec)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion v2/audit/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func (a *DataAuditResult) StableMarshal(buf []byte) ([]byte, error) {

offset += n

n, err = proto.RepeatedBytesMarshal(failNodesFNum, buf[offset:], a.failNodes)
_, err = proto.RepeatedBytesMarshal(failNodesFNum, buf[offset:], a.failNodes)
if err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions v2/netmap/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func (s *Selector) StableMarshal(buf []byte) ([]byte, error) {

offset += n

n, err = protoutil.StringMarshal(filterSelectorField, buf[offset:], s.filter)
_, err = protoutil.StringMarshal(filterSelectorField, buf[offset:], s.filter)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -209,7 +209,7 @@ func (r *Replica) StableMarshal(buf []byte) ([]byte, error) {

offset += n

n, err = protoutil.StringMarshal(selectorReplicaField, buf[offset:], r.selector)
_, err = protoutil.StringMarshal(selectorReplicaField, buf[offset:], r.selector)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -418,7 +418,7 @@ func (ni *NodeInfo) StableMarshal(buf []byte) ([]byte, error) {
offset += n
}

n, err = protoutil.EnumMarshal(stateNodeInfoField, buf[offset:], int32(ni.state))
_, err = protoutil.EnumMarshal(stateNodeInfoField, buf[offset:], int32(ni.state))
if err != nil {
return nil, err
}
Expand Down
8 changes: 3 additions & 5 deletions v2/object/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ func (h *ShortHeader) StableMarshal(buf []byte) ([]byte, error) {

offset += n

n, err = proto.NestedStructureMarshal(shortHdrHomoHashField, buf[offset:], h.homoHash)
_, err = proto.NestedStructureMarshal(shortHdrHomoHashField, buf[offset:], h.homoHash)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -485,13 +485,11 @@ func (h *HeaderWithSignature) StableMarshal(buf []byte) ([]byte, error) {

offset += n

n, err = proto.NestedStructureMarshal(hdrWithSigSignatureField, buf[offset:], h.signature)
_, err = proto.NestedStructureMarshal(hdrWithSigSignatureField, buf[offset:], h.signature)
if err != nil {
return nil, err
}

offset += n

return buf, nil
}

Expand Down Expand Up @@ -840,7 +838,7 @@ func (r *PutObjectPartInit) StableMarshal(buf []byte) ([]byte, error) {

offset += n

n, err = proto.UInt32Marshal(putReqInitCopiesNumField, buf[offset:], r.copyNum)
_, err = proto.UInt32Marshal(putReqInitCopiesNumField, buf[offset:], r.copyNum)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion v2/storagegroup/marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (s *StorageGroup) StableMarshal(buf []byte) ([]byte, error) {

offset += n

n, err = refs.ObjectIDNestedListMarshal(objectIDsField, buf[offset:], s.members)
_, err = refs.ObjectIDNestedListMarshal(objectIDsField, buf[offset:], s.members)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 43c579f

Please sign in to comment.