diff options
author | Thomas Haller <thaller@redhat.com> | 2020-05-06 23:18:54 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2020-05-07 13:58:09 +0200 |
commit | 3a1273f777133d5be745950dce4555c2adb664f0 (patch) | |
tree | ed50d36a71612fdf8063e524660c2adcdfd22b7d /clients/cli/connections.c | |
parent | b93e12cb43b6401ac3a891fe8841f08eddbf6b1d (diff) | |
download | NetworkManager-3a1273f777133d5be745950dce4555c2adb664f0.tar.gz |
cli: avoid empty if block without a comment
lgtm.com flags this as "Empty block without comment".
Avoid it.
This code is of course ugly. Much work was already done to
port such occurrences, and more is needed. I won't add a FIXME
comment, because lgtm.com flags those too. :)
Diffstat (limited to 'clients/cli/connections.c')
-rw-r--r-- | clients/cli/connections.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c index 65cc1e905e..e6d6c69905 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -1451,7 +1451,9 @@ nmc_active_connection_details (NMActiveConnection *acon, NmCli *nmc) gboolean was_output = FALSE; if (!nmc->required_fields || g_ascii_strcasecmp (nmc->required_fields, "common") == 0) { + /* pass */ } else if (!nmc->required_fields || g_ascii_strcasecmp (nmc->required_fields, "all") == 0) { + /* pass */ } else fields_str = nmc->required_fields; @@ -2076,6 +2078,7 @@ do_connections_show (const NMCCommand *cmd, NmCli *nmc, int argc, const char *co if (!nmc->required_fields || g_ascii_strcasecmp (nmc->required_fields, "common") == 0) fields_str = NMC_FIELDS_CON_SHOW_COMMON; else if (!nmc->required_fields || g_ascii_strcasecmp (nmc->required_fields, "all") == 0) { + /* pass */ } else fields_str = nmc->required_fields; |