From: Hans de G. <hde...@re...> - 2014-07-23 08:50:33
|
Hi, On 07/23/2014 10:18 AM, Chris Dickens wrote: > Hi, > > On Tue, Jul 22, 2014 at 1:40 AM, Hans de Goede <hde...@re...> wrote: > >> This check will trigger when num_pollfds == 0, returning an error even >> though there >> is no error. I think this is best fixed by moving the check to inside the >> if (ctx->num_pollfds > 0) block. > > > This is actually an interesting case, because technically the number of > poll fds for a valid context can never be less than two (control pipe and > hotplug pipe). I will move the NULL check into the block as suggested, but > the condition checked against (num_pollfds > 0) should never be false. Not all platforms do hotplug yet, but your right about the control pipe, alternatively you could simply replace the num_pollfds > 0 if with an assert. Regards, Hans |