I noticed some code in tui_enable doing:
...
if (...)
error (...);
else if (...)
...
which is the "Don’t use else after a return" anti-pattern [1].
Fix this by using:
...
if (...)
error (...);
if (...)
...
Approved-By: Tom Tromey <tom@tromey.com>
[1] https://llvm.org/docs/CodingStandards.html#id41
again. */
error (_("Cannot enable the TUI"));
}
- else if (tui_finish_init == TRIBOOL_TRUE)
+
+ if (tui_finish_init == TRIBOOL_TRUE)
{
WINDOW *w;
SCREEN *s;