mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
make CodeQL happy
This commit is contained in:
parent
301b49b63f
commit
3f3a1341d8
|
@ -40,7 +40,7 @@ type VolumeServerOptions struct {
|
||||||
portGrpc *int
|
portGrpc *int
|
||||||
publicPort *int
|
publicPort *int
|
||||||
folders []string
|
folders []string
|
||||||
folderMaxLimits []int
|
folderMaxLimits []int32
|
||||||
idxFolder *string
|
idxFolder *string
|
||||||
ip *string
|
ip *string
|
||||||
publicUrl *string
|
publicUrl *string
|
||||||
|
@ -148,8 +148,8 @@ func (v VolumeServerOptions) startVolumeServer(volumeFolders, maxVolumeCounts, v
|
||||||
// set max
|
// set max
|
||||||
maxCountStrings := strings.Split(maxVolumeCounts, ",")
|
maxCountStrings := strings.Split(maxVolumeCounts, ",")
|
||||||
for _, maxString := range maxCountStrings {
|
for _, maxString := range maxCountStrings {
|
||||||
if max, e := strconv.Atoi(maxString); e == nil {
|
if max, e := strconv.ParseInt(maxString, 10, 64); e == nil {
|
||||||
v.folderMaxLimits = append(v.folderMaxLimits, max)
|
v.folderMaxLimits = append(v.folderMaxLimits, int32(max))
|
||||||
} else {
|
} else {
|
||||||
glog.Fatalf("The max specified in -max not a valid number %s", maxString)
|
glog.Fatalf("The max specified in -max not a valid number %s", maxString)
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ type VolumeServer struct {
|
||||||
|
|
||||||
func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
|
func NewVolumeServer(adminMux, publicMux *http.ServeMux, ip string,
|
||||||
port int, grpcPort int, publicUrl string,
|
port int, grpcPort int, publicUrl string,
|
||||||
folders []string, maxCounts []int, minFreeSpaces []util.MinFreeSpace, diskTypes []types.DiskType,
|
folders []string, maxCounts []int32, minFreeSpaces []util.MinFreeSpace, diskTypes []types.DiskType,
|
||||||
idxFolder string,
|
idxFolder string,
|
||||||
needleMapKind storage.NeedleMapKind,
|
needleMapKind storage.NeedleMapKind,
|
||||||
masterNodes []pb.ServerAddress, pulseSeconds int,
|
masterNodes []pb.ServerAddress, pulseSeconds int,
|
||||||
|
|
|
@ -65,7 +65,7 @@ func (s *Store) String() (str string) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewStore(grpcDialOption grpc.DialOption, ip string, port int, grpcPort int, publicUrl string, dirnames []string, maxVolumeCounts []int,
|
func NewStore(grpcDialOption grpc.DialOption, ip string, port int, grpcPort int, publicUrl string, dirnames []string, maxVolumeCounts []int32,
|
||||||
minFreeSpaces []util.MinFreeSpace, idxFolder string, needleMapKind NeedleMapKind, diskTypes []DiskType) (s *Store) {
|
minFreeSpaces []util.MinFreeSpace, idxFolder string, needleMapKind NeedleMapKind, diskTypes []DiskType) (s *Store) {
|
||||||
s = &Store{grpcDialOption: grpcDialOption, Port: port, Ip: ip, GrpcPort: grpcPort, PublicUrl: publicUrl, NeedleMapKind: needleMapKind}
|
s = &Store{grpcDialOption: grpcDialOption, Port: port, Ip: ip, GrpcPort: grpcPort, PublicUrl: publicUrl, NeedleMapKind: needleMapKind}
|
||||||
s.Locations = make([]*DiskLocation, 0)
|
s.Locations = make([]*DiskLocation, 0)
|
||||||
|
|
Loading…
Reference in a new issue