Skip to content

Commit

Permalink
replaced maxUInt with constant
Browse files Browse the repository at this point in the history
  • Loading branch information
TheFireMike committed Mar 5, 2021
1 parent 830677f commit 141edfe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/communicator/network_device_communicator.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/inexio/thola/core/tholaerr"
"github.com/inexio/thola/core/utility"
"github.com/pkg/errors"
"math"
)

// NetworkDeviceCommunicator represents a communicator for a device
Expand Down Expand Up @@ -1024,7 +1025,7 @@ func (c *networkDeviceCommunicator) isHead() bool {

func normalizeInterfaces(interfaces []device.Interface) []device.Interface {
for i, interf := range interfaces {
if interf.IfSpeed != nil && interf.IfHighSpeed != nil && *interf.IfSpeed == 4294967295 {
if interf.IfSpeed != nil && interf.IfHighSpeed != nil && *interf.IfSpeed == math.MaxUint32 {
ifSpeed := *interf.IfHighSpeed * 1000000
interfaces[i].IfSpeed = &ifSpeed
}
Expand Down

0 comments on commit 141edfe

Please sign in to comment.