LshiftUint32 returns a << b with an integer overflow check.
(a, b uint32)
| 268 | // LshiftUint32 returns a << b |
| 269 | // with an integer overflow check. |
| 270 | func LshiftUint32(a, b uint32) (result uint32, ok bool) { |
| 271 | if b >= 32 { |
| 272 | return 0, false |
| 273 | } |
| 274 | if a > math.MaxUint32>>uint(b) { |
| 275 | return 0, false |
| 276 | } |
| 277 | return a << uint(b), true |
| 278 | } |
nothing calls this directly
no outgoing calls
no test coverage detected