Skip to content

Commit

Permalink
fpga: fix codeql issues
Browse files Browse the repository at this point in the history
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
  • Loading branch information
tkatila committed Dec 5, 2023
1 parent a0bc682 commit df83e1b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/fpga/dfl_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/fpga/intel_fpga_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit df83e1b

Please sign in to comment.