fpga: fix codeql issues

Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
This commit is contained in:
Tuomas Katila 2023-12-05 15:50:04 +02:00
parent a0bc682b9b
commit df83e1bb7c
2 changed files with 2 additions and 2 deletions

View File

@ -236,7 +236,7 @@ func (f *DflFME) GetPortsNum() int {
}
n, err := strconv.ParseUint(f.PortsNum, 10, 32)
if err != nil || n >= math.MaxInt {
if err != nil || n > math.MaxInt32 {
return -1
}

View File

@ -241,7 +241,7 @@ func (f *IntelFpgaFME) GetPortsNum() int {
}
n, err := strconv.ParseUint(f.PortsNum, 10, 32)
if err != nil || n >= math.MaxInt {
if err != nil || n > math.MaxInt32 {
return -1
}