diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2014-08-10 13:54:24 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2014-08-10 15:50:18 +0200 |
commit | 15bb7656a53d28003aebc8a829cdd9a025f2e9f1 (patch) | |
tree | 3e9daae7002e137bb0faa221341184daf55618f3 | |
parent | 733eb99b1773452f11318d856ed4f1008f1bf8fa (diff) | |
download | weechat-15bb7656a53d28003aebc8a829cdd9a025f2e9f1.zip |
core: remove dead assignment in function hook_command_exec
-rw-r--r-- | src/core/wee-hook.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index a72324833..0d9f9d3a6 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -674,12 +674,9 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin, if (!buffer || !string || !string[0]) return -1; - rc = hook_command_run_exec (buffer, string); - if (rc == WEECHAT_RC_OK_EAT) + if (hook_command_run_exec (buffer, string) == WEECHAT_RC_OK_EAT) return 1; - rc = -1; - argv = string_split (string, " ", 0, 0, &argc); if (argc == 0) { @@ -726,12 +723,9 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin, ptr_hook = next_hook; } - if (!hook_plugin && !hook_other_plugin) - { - /* command not found at all */ - rc = -1; - } - else + rc = -1; + + if (hook_plugin || hook_other_plugin) { if (!hook_plugin && (count_other_plugin > 1) && (hook_other_plugin->priority == hook_other_plugin2->priority)) |