Skip to content

Commit 2e230e6

Browse files
authored
fix: Correct conversion of int with specific bit size (#9933)
1 parent e17561d commit 2e230e6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/inputs/procstat/procstat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ func (p *Procstat) simpleSystemdUnitPIDs() ([]PID, error) {
474474
if len(kv[1]) == 0 || bytes.Equal(kv[1], []byte("0")) {
475475
return nil, nil
476476
}
477-
pid, err := strconv.Atoi(string(kv[1]))
477+
pid, err := strconv.ParseInt(string(kv[1]), 10, 32)
478478
if err != nil {
479479
return nil, fmt.Errorf("invalid pid '%s'", kv[1])
480480
}

0 commit comments

Comments
 (0)