
21 Jul
2022
21 Jul
'22
8:58 a.m.
On Thu, Jul 21, 2022 at 01:30:44PM +0200, Kristina Hanicova wrote:
The else branches are redundant because the execution will never reach them if the conditions in the previous 'if' branches are true.
I think this looks cleaner and is more readable, because having 'else' branch indicates that no return / break / goto is in the previous branch and the function can reach it.
Signed-off-by: Kristina Hanicova <khanicov@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>