aboutsummaryrefslogtreecommitdiff
path: root/weed/command/volume.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2022-08-26 17:09:11 -0700
committerchrislu <chris.lu@gmail.com>2022-08-26 17:09:11 -0700
commit3f3a1341d846fdb36da7eb1b3b51631d2330b732 (patch)
tree7911b36fea5417e67953db8d2cf2f0a1bcb6b7f6 /weed/command/volume.go
parent301b49b63f5261595a5117ae12aa9a9e6b3ed74b (diff)
downloadseaweedfs-3f3a1341d846fdb36da7eb1b3b51631d2330b732.tar.xz
seaweedfs-3f3a1341d846fdb36da7eb1b3b51631d2330b732.zip
make CodeQL happy
Diffstat (limited to 'weed/command/volume.go')
-rw-r--r--weed/command/volume.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/command/volume.go b/weed/command/volume.go
index 91d9fb925..3ad8ba1bb 100644
--- a/weed/command/volume.go
+++ b/weed/command/volume.go
@@ -40,7 +40,7 @@ type VolumeServerOptions struct {
portGrpc *int
publicPort *int
folders []string
- folderMaxLimits []int
+ folderMaxLimits []int32
idxFolder *string
ip *string
publicUrl *string
@@ -148,8 +148,8 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
// set max
maxCountStrings := strings.Split(maxVolumeCounts, ",")
for _, maxString := range maxCountStrings {
- if max, e := strconv.Atoi(maxString); e == nil {
- v.folderMaxLimits = append(v.folderMaxLimits, max)
+ if max, e := strconv.ParseInt(maxString, 10, 64); e == nil {
+ v.folderMaxLimits = append(v.folderMaxLimits, int32(max))
} else {
glog.Fatalf("The max specified in -max not a valid number %s", maxString)
}