On Wed, Apr 20, 2022 at 10:19 AM Eelco Chaudron <[email protected]> wrote: > On 19 Apr 2022, at 18:20, Harry van Haaren wrote: > > > The code changes here are to handle (1 << i) shifts where 'i' is the > > packet index in the batch, and 1 << 31 is an overflow of the signed '1'. > > > > Fixed by adding ULL suffix to the 1 character, ensuring compiler knows > > the 1 is unsigned (and 32-bits minimum). Undefined Behaviour sanitizer > > is now happy with the shifts at runtime. > > Change looks good to me, but should 1UL not be enough, as the destinations > are all 32-bit?
For storing/comparing to explicit uint32_t variables, either (uint32_t)1 or UINT32_C(1) are more natural. Any reason not to use those? -- David Marchand _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
