[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] find_next{,_zero}_bit() inconsistencies
On 29/08/2016 12:59, Jan Beulich wrote: > Hello, > > in the context of > https://lists.xenproject.org/archives/html/xen-devel/2016-08/msg03068.html > I once again came across the different behavior our various > implementations of the $subject functions, in particular their varying > handling of the offset argument being greater / greater-or-equal > the size argument. Shouldn't we settle on a single, uniform model, > which might be > 1) offset >= size is valid, returns size, > 2) offset == size is valid, returns size, offset > size is invalid, > 3) offset >= size is invalid. > > Thanks for opinions, Jan > A number of existing situations use size as an end sentinel, so option 3 will probably break things. What did you have in mind for invalid? Option 2 is probably the better angle, especially for catching errors, but it is might show up some existing latently-buggy code which would also need fixing. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |