water icon indicating copy to clipboard operation
water copied to clipboard

Fix MacOS integer contsant overflow compilation error

Open akiroz opened this issue 4 years ago • 0 comments

The line ifIndex > math.MaxUint32-1 throws a compilation error where int is 32 bit since int32 is signed and cannot go above 2^31 - 1.

However, I'm really curious about the original intent of this check, under what circumstances does ifIndex exceed MaxUint32 - 1 if int was int64?

akiroz avatar May 17 '20 08:05 akiroz