diff options
author | Jiri Slaby <jslaby@suse.cz> | 2021-05-05 11:19:02 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-13 16:57:16 +0200 |
commit | e8f2a139ffb600f47c3ddb286e5bd9a71041c35a (patch) | |
tree | 24a2f8b8fa3e30d756a27cf65b60abe9be619689 /COPYING | |
parent | 3a7d530a0cf9b82fce3596627259a67c511ec917 (diff) | |
download | linux-e8f2a139ffb600f47c3ddb286e5bd9a71041c35a.tar.bz2 |
n_tty: invert TTY_NORMAL condition in n_tty_receive_buf_standard
Handle !TTY_NORMAL as a short path and 'continue' the loop. Do the rest as
a normal code flow. This decreases the indentation level by one and
makes the code flow more understandable.
IOW, we avoid
if (cond) {
LONG CODE;
} else
single_line();
by
if (!cond) {
single_line();
continue;
}
LONG CODE;
While at it, invert also the 'if (!test_bit) A else B' into 'if
(test_bit) B else A'.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210505091928.22010-10-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions