mirror of
https://github.com/intel/intel-device-plugins-for-kubernetes.git
synced 2025-06-03 03:59:37 +00:00
fpga: fix codeql issues
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
This commit is contained in:
parent
a0bc682b9b
commit
df83e1bb7c
@ -236,7 +236,7 @@ func (f *DflFME) GetPortsNum() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
n, err := strconv.ParseUint(f.PortsNum, 10, 32)
|
n, err := strconv.ParseUint(f.PortsNum, 10, 32)
|
||||||
if err != nil || n >= math.MaxInt {
|
if err != nil || n > math.MaxInt32 {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ func (f *IntelFpgaFME) GetPortsNum() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
n, err := strconv.ParseUint(f.PortsNum, 10, 32)
|
n, err := strconv.ParseUint(f.PortsNum, 10, 32)
|
||||||
if err != nil || n >= math.MaxInt {
|
if err != nil || n > math.MaxInt32 {
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user