On Fri, Aug 14, 2020 at 05:17:22PM +0200, Rafael J. Wysocki wrote: > On Thu, Aug 13, 2020 at 7:57 PM Andy Shevchenko > <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote: > > > > Now we have for 'other' and 'type' variables > > > > other type return > > 0 0 REGION_DISJOINT > > 0 x REGION_INTERSECTS > > x 0 REGION_DISJOINT > > x x REGION_MIXED > > > > Obviously it's easier to check 'type' for 0 first instead of > > currently checked 'other'. ... > > + return (other == 0) ? REGION_INTERSECTS : REGION_MIXED; > > The parens are not needed here. Right. > Also I would do > > if (other == 0) > REGION_INTERSECTS; > > return REGION_MIXED; Works for me, I'll update in v2. -- With Best Regards, Andy Shevchenko