Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netstat change uint size from 32 to 64 bits #419

Merged
merged 1 commit into from Oct 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions netstat.go
Expand Up @@ -23,8 +23,8 @@ import (

// NetStat contains statistics for all the counters from one file
type NetStat struct {
Filename string
Stats map[string][]uint64
Filename string
SuperQ marked this conversation as resolved.
Show resolved Hide resolved
}

// NetStat retrieves stats from /proc/net/stat/
Expand Down Expand Up @@ -55,7 +55,7 @@ func (fs FS) NetStat() ([]NetStat, error) {
// Other strings represent per-CPU counters
for scanner.Scan() {
for num, counter := range strings.Fields(scanner.Text()) {
value, err := strconv.ParseUint(counter, 16, 32)
value, err := strconv.ParseUint(counter, 16, 64)
if err != nil {
return nil, err
}
Expand Down