diff --git a/src/core/hook/wee-hook-hsignal.c b/src/core/hook/wee-hook-hsignal.c index 505336688..41e4917b4 100644 --- a/src/core/hook/wee-hook-hsignal.c +++ b/src/core/hook/wee-hook-hsignal.c @@ -204,7 +204,6 @@ hook_hsignal_add_to_infolist (struct t_infolist_item *item, if (!infolist_new_var_pointer (item, "callback", HOOK_HSIGNAL(hook, callback))) return 0; - i = 0; for (i = 0; i < HOOK_HSIGNAL(hook, num_signals); i++) { snprintf (option_name, sizeof (option_name), "signal_%05d", i); diff --git a/src/core/hook/wee-hook-signal.c b/src/core/hook/wee-hook-signal.c index f08f20550..db8db4bc6 100644 --- a/src/core/hook/wee-hook-signal.c +++ b/src/core/hook/wee-hook-signal.c @@ -205,7 +205,6 @@ hook_signal_add_to_infolist (struct t_infolist_item *item, if (!infolist_new_var_pointer (item, "callback", HOOK_SIGNAL(hook, callback))) return 0; - i = 0; for (i = 0; i < HOOK_SIGNAL(hook, num_signals); i++) { snprintf (option_name, sizeof (option_name), "signal_%05d", i); diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c index 7a0e6fe47..72e2226b2 100644 --- a/src/gui/gui-line.c +++ b/src/gui/gui-line.c @@ -867,12 +867,13 @@ gui_line_has_highlight (struct t_gui_line *line) const char *ptr_nick; regmatch_t regex_match; - rc = 0; - /* remove color codes from line message */ msg_no_color = gui_color_decode (line->data->message, NULL); if (!msg_no_color) - return 0; + { + rc = 0; + goto end; + } ptr_msg_no_color = msg_no_color; /* @@ -1047,7 +1048,8 @@ gui_line_has_highlight (struct t_gui_line *line) } end: - free (msg_no_color); + if (msg_no_color) + free (msg_no_color); return rc; }