[Intel-gfx] [PATCH i-g-t 4/7] kms_flip: Remove unreachable condition in wait_for_events
Petri Latvala
petri.latvala at intel.com
Tue Mar 5 10:39:11 UTC 2019
On Mon, Mar 04, 2019 at 12:30:55PM -0300, Rodrigo Siqueira wrote:
> In the function wait_for_events() has a double check in the select()
> function return as described below:
>
> igt_assert_f(ret >= 0,
> "select error (errno %i)\n", errno);
> igt_assert_f(ret > 0,
> "select timed out or error (ret %d)\n", ret);
>
> Note that the second assert condition will not be reached because of the
> first assertion. This commit removes the code duplication and update the
> error message.
It will be reached if ret equals 0.
If select() returns 0, errno is unspecified, the main reason for the
separation.
--
Petri Latvala
More information about the Intel-gfx
mailing list