mirror of
https://github.com/minio/minio.git
synced 2025-02-05 10:48:07 -05:00
fix: specify size in some map allocations (#20764)
This commit is contained in:
parent
54ecce66f0
commit
68b004a48f
@ -256,7 +256,7 @@ func (z *erasureServerPools) NewNSLock(bucket string, objects ...string) RWLocke
|
|||||||
|
|
||||||
// GetDisksID will return disks by their ID.
|
// GetDisksID will return disks by their ID.
|
||||||
func (z *erasureServerPools) GetDisksID(ids ...string) []StorageAPI {
|
func (z *erasureServerPools) GetDisksID(ids ...string) []StorageAPI {
|
||||||
idMap := make(map[string]struct{})
|
idMap := make(map[string]struct{}, len(ids))
|
||||||
for _, id := range ids {
|
for _, id := range ids {
|
||||||
idMap[id] = struct{}{}
|
idMap[id] = struct{}{}
|
||||||
}
|
}
|
||||||
|
@ -60,7 +60,7 @@ const (
|
|||||||
// getCanonicalHeaders generate a list of request headers with their values
|
// getCanonicalHeaders generate a list of request headers with their values
|
||||||
func getCanonicalHeaders(signedHeaders http.Header) string {
|
func getCanonicalHeaders(signedHeaders http.Header) string {
|
||||||
var headers []string
|
var headers []string
|
||||||
vals := make(http.Header)
|
vals := make(http.Header, len(signedHeaders))
|
||||||
for k, vv := range signedHeaders {
|
for k, vv := range signedHeaders {
|
||||||
k = strings.ToLower(k)
|
k = strings.ToLower(k)
|
||||||
headers = append(headers, k)
|
headers = append(headers, k)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user