simplifying if-else chains to switches (#6208)

This commit is contained in:
Oleg Kovalov
2018-08-06 19:26:40 +02:00
committed by kannappanr
parent a82500f162
commit 37de2dbd3b
14 changed files with 120 additions and 138 deletions

View File

@@ -427,9 +427,10 @@ func hashKey(algo string, key string, cardinality int) int {
switch algo {
case formatXLVersionV2DistributionAlgo:
return crcHashMod(key, cardinality)
default:
// Unknown algorithm returns -1, also if cardinality is lesser than 0.
return -1
}
// Unknown algorithm returns -1, also if cardinality is lesser than 0.
return -1
}
// Returns always a same erasure coded set for a given input.