diff options
author | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2016-09-21 15:59:33 +0200 |
---|---|---|
committer | ailin-nemui <ailin-nemui@users.noreply.github.com> | 2016-09-21 15:59:33 +0200 |
commit | ac73255483a42851db6a54ae4f0d5040e94608a2 (patch) | |
tree | 23c38bc6224171640d44be3269053948dd1a92e8 /src/fe-common/core/fe-exec.c | |
parent | 13f4026ae0f0d5422f3163576d4c2eff8754176a (diff) | |
parent | d9b4cb34dccd7fb77e1d222333f3018ff947899c (diff) | |
download | irssi-ac73255483a42851db6a54ae4f0d5040e94608a2.zip |
Merge branch 'master' into integrate/0.8.20
Diffstat (limited to 'src/fe-common/core/fe-exec.c')
-rw-r--r-- | src/fe-common/core/fe-exec.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/fe-common/core/fe-exec.c b/src/fe-common/core/fe-exec.c index b5f289ce..36990866 100644 --- a/src/fe-common/core/fe-exec.c +++ b/src/fe-common/core/fe-exec.c @@ -237,22 +237,13 @@ static int signal_name_to_id(const char *name) static int cmd_options_get_signal(const char *cmd, GHashTable *optlist) { - GSList *list, *tmp, *next; + GList *list; char *signame; int signum; /* get all the options, then remove the known ones. there should be only one left - the signal */ - list = hashtable_get_keys(optlist); - if (cmd != NULL) { - for (tmp = list; tmp != NULL; tmp = next) { - char *option = tmp->data; - next = tmp->next; - - if (command_have_option(cmd, option)) - list = g_slist_remove(list, option); - } - } + list = optlist_remove_known(cmd, optlist); if (list == NULL) return -1; @@ -272,7 +263,7 @@ static int cmd_options_get_signal(const char *cmd, return -2; } - g_slist_free(list); + g_list_free(list); return signum; } |