Skip to content

Commit

Permalink
Fix 32-bit windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
srebhan committed Nov 3, 2023
1 parent d5df3cd commit da0df4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/inputs/win_perf_counters/win_perf_counters.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
//go:embed sample.conf
var sampleConfig string

var defaultMaxBufferSize = config.Size(4 * 1024 * 1024)
var defaultMaxBufferSize = config.Size(100 * 1024 * 1024)

type WinPerfCounters struct {
PrintValid bool `toml:"PrintValid"`
Expand Down Expand Up @@ -588,7 +588,7 @@ func (m *WinPerfCounters) Init() error {
return fmt.Errorf("maximum buffer size should at least be %d", 2*initialBufferSize)
}
if m.MaxBufferSize > math.MaxUint32 {
return fmt.Errorf("maximum buffer size should be smaller than %d", math.MaxUint32)
return fmt.Errorf("maximum buffer size should be smaller than %d", uint32(math.MaxUint32))
}

if m.UseWildcardsExpansion && !m.LocalizeWildcardsExpansion {
Expand Down

0 comments on commit da0df4f

Please sign in to comment.