Skip to content

Commit

Permalink
fix: specify size in some map allocations (minio#20764)
Browse files Browse the repository at this point in the history
  • Loading branch information
arturmelanchyk authored Dec 13, 2024
1 parent 54ecce6 commit 68b004a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/erasure-server-pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func (z *erasureServerPools) NewNSLock(bucket string, objects ...string) RWLocke

// GetDisksID will return disks by their ID.
func (z *erasureServerPools) GetDisksID(ids ...string) []StorageAPI {
idMap := make(map[string]struct{})
idMap := make(map[string]struct{}, len(ids))
for _, id := range ids {
idMap[id] = struct{}{}
}
Expand Down
2 changes: 1 addition & 1 deletion cmd/signature-v4.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const (
// getCanonicalHeaders generate a list of request headers with their values
func getCanonicalHeaders(signedHeaders http.Header) string {
var headers []string
vals := make(http.Header)
vals := make(http.Header, len(signedHeaders))
for k, vv := range signedHeaders {
k = strings.ToLower(k)
headers = append(headers, k)
Expand Down

0 comments on commit 68b004a

Please sign in to comment.