Skip to content

Commit

Permalink
cgroupstats: ParseInt node to int-sized integer.
Browse files Browse the repository at this point in the history
ParseInt node to int (bitSize 0) since that's what we're casting
it later to.

Signed-off-by: Krisztian Litkey <krisztian.litkey@intel.com>
  • Loading branch information
klihub committed Aug 14, 2023
1 parent 88530a4 commit 7c42836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cgroups/cgroupstats.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ func GetGlobalNumaStats() (map[int]GlobalNumaStats, error) {

for _, dir := range nodeDirs {
id := strings.TrimPrefix(dir, prefix)
node, err := strconv.ParseInt(id, 10, 64)
node, err := strconv.ParseInt(id, 10, 0)
if err != nil {
return map[int]GlobalNumaStats{}, fmt.Errorf("error parsing directory name")
}
Expand Down

0 comments on commit 7c42836

Please sign in to comment.