diff options
author | Thomas Haller <thaller@redhat.com> | 2018-10-09 13:51:04 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-10-09 15:07:11 +0200 |
commit | 9926ae8c8077608baf982908c0ec6aba251bc0b9 (patch) | |
tree | c17ac576ab2fbcaa04d609aee1be3c286da87fc0 | |
parent | 014d0b16cdc6c203c4d7f647d9f131e59ecb2490 (diff) | |
download | NetworkManager-th/cli-drop-some-global.tar.gz |
cli: don't needlessly cast function pointer for rl_attempted_completion_functionth/cli-drop-some-global
-rw-r--r-- | clients/cli/connections.c | 6 | ||||
-rw-r--r-- | clients/cli/devices.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/clients/cli/connections.c b/clients/cli/connections.c index df172f748f..6cc886870f 100644 --- a/clients/cli/connections.c +++ b/clients/cli/connections.c @@ -5109,7 +5109,7 @@ do_connection_add (NmCli *nmc, int argc, char **argv) next_arg (nmc, &argc, &argv, NULL); - rl_attempted_completion_function = (rl_completion_func_t *) nmcli_con_add_tab_completion; + rl_attempted_completion_function = nmcli_con_add_tab_completion; nmc->return_value = NMC_RESULT_SUCCESS; @@ -8121,7 +8121,7 @@ do_connection_edit (NmCli *nmc, int argc, char **argv) /* Setup some readline completion stuff */ /* Set a pointer to an alternative function to create matches */ - rl_attempted_completion_function = (rl_completion_func_t *) nmcli_editor_tab_completion; + rl_attempted_completion_function = nmcli_editor_tab_completion; /* Use ' ' and '.' as word break characters */ rl_completer_word_break_characters = ". "; @@ -9103,7 +9103,7 @@ do_connections (NmCli *nmc, int argc, char **argv) nmc_start_polkit_agent_start_try (nmc); /* Set completion function for 'nmcli con' */ - rl_attempted_completion_function = (rl_completion_func_t *) nmcli_con_tab_completion; + rl_attempted_completion_function = nmcli_con_tab_completion; nmc_do_cmd (nmc, connection_cmds, *argv, argc, argv); diff --git a/clients/cli/devices.c b/clients/cli/devices.c index caed85bf26..0916bf015e 100644 --- a/clients/cli/devices.c +++ b/clients/cli/devices.c @@ -2538,7 +2538,7 @@ do_device_set (NmCli *nmc, int argc, char **argv) return error->code; } - if (!argc) { + if (!argc) { g_string_printf (nmc->return_text, _("Error: No property specified.")); return NMC_RESULT_ERROR_USER_INPUT; } |