]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
Squash two identical `if` branches
authorDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Sun, 26 Sep 2021 13:06:35 +0000 (15:06 +0200)
committerDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Sat, 26 Feb 2022 15:51:04 +0000 (16:51 +0100)
commitad22d92f424671f410e93a6fddf4fbf299c50e87
treebf6b0cd3f410bf01e285cfd7ea972dcf7918ac19
parent034c05d4658f0065144f84e5c4a509e47413619b
Squash two identical `if` branches

This fixes a DeepSource alert:

Branches of the `if` statement have similar implementation

For the highlighted `if` statements, all the `elif`/`else` branches have
the same body as `if`. It is recommended to refactor this snippet.

If the if-chain is performing the same action in every case, it shouldn't
be used there at all.

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
trojans/tncc-emulate.py