Re: [PATCH i-g-t 4/7] kms_flip: Remove unreachable condition in wait_for_events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux