summaryrefslogtreecommitdiff
path: root/src/core/wee-hook.c
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2007-11-05 18:51:53 +0100
committerSebastien Helleu <flashcode@flashtux.org>2007-11-05 18:51:53 +0100
commitb64b0fe6ca4c3d890cafc397b9e1f3021043fe72 (patch)
treefa6ea56641a2c2a70be9f0995d4dae76907a1e6d /src/core/wee-hook.c
parent0d66286efe2ca1ee3375cef499a7a629883dc21c (diff)
downloadweechat-b64b0fe6ca4c3d890cafc397b9e1f3021043fe72.zip
Added string_remove_quotes() function, use of argv and argv_eol for WeeChat commands arguments
Diffstat (limited to 'src/core/wee-hook.c')
-rw-r--r--src/core/wee-hook.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c
index cea271b7d..e33d26e4f 100644
--- a/src/core/wee-hook.c
+++ b/src/core/wee-hook.c
@@ -162,8 +162,7 @@ hook_command_exec (void *plugin, char *string)
argv = string_explode (string, " ", 0, 0, &argc);
if (argc == 0)
{
- if (argv)
- string_free_exploded (argv);
+ string_free_exploded (argv);
return -1;
}
argv_eol = string_explode (string, " ", 1, 0, NULL);
@@ -184,10 +183,8 @@ hook_command_exec (void *plugin, char *string)
}
}
- if (argv)
- string_free_exploded (argv);
- if (argv_eol)
- string_free_exploded (argv_eol);
+ string_free_exploded (argv);
+ string_free_exploded (argv_eol);
/* no hook found */
return -1;