diff options
-rw-r--r-- | src/plugins/buflist/buflist-bar-item.c | 6 | ||||
-rw-r--r-- | src/plugins/buflist/buflist-config.c | 35 |
2 files changed, 14 insertions, 27 deletions
diff --git a/src/plugins/buflist/buflist-bar-item.c b/src/plugins/buflist/buflist-bar-item.c index b66fba4be..ac3fbe062 100644 --- a/src/plugins/buflist/buflist-bar-item.c +++ b/src/plugins/buflist/buflist-bar-item.c @@ -599,8 +599,7 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, weechat_hashtable_set (buflist_hashtable_extra_vars, "hotlist", (str_hotlist) ? str_hotlist : ""); - if (str_hotlist) - free (str_hotlist); + free (str_hotlist); /* lag */ ptr_lag = weechat_buffer_get_string (ptr_buffer, "localvar_lag"); @@ -632,8 +631,7 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data, buflist_hashtable_extra_vars, buflist_hashtable_options_conditions); rc = (condition && (strcmp (condition, "1") == 0)); - if (condition) - free (condition); + free (condition); if (!rc) continue; diff --git a/src/plugins/buflist/buflist-config.c b/src/plugins/buflist/buflist-config.c index 8a0b3c031..8921b2022 100644 --- a/src/plugins/buflist/buflist-config.c +++ b/src/plugins/buflist/buflist-config.c @@ -328,8 +328,7 @@ buflist_config_change_sort (const void *pointer, void *data, 0, &buflist_config_sort_fields_count[i]); - if (sort) - free (sort); + free (sort); } weechat_hashtable_free (hashtable_pointers); @@ -446,18 +445,15 @@ buflist_config_change_format (const void *pointer, void *data, (void) data; (void) option; - if (buflist_config_format_buffer_eval) - free (buflist_config_format_buffer_eval); + free (buflist_config_format_buffer_eval); buflist_config_format_buffer_eval = buflist_config_add_eval_for_formats ( weechat_config_string (buflist_config_format_buffer)); - if (buflist_config_format_buffer_current_eval) - free (buflist_config_format_buffer_current_eval); + free (buflist_config_format_buffer_current_eval); buflist_config_format_buffer_current_eval = buflist_config_add_eval_for_formats ( weechat_config_string (buflist_config_format_buffer_current)); - if (buflist_config_format_hotlist_eval) - free (buflist_config_format_hotlist_eval); + free (buflist_config_format_hotlist_eval); buflist_config_format_hotlist_eval = buflist_config_add_eval_for_formats ( weechat_config_string (buflist_config_format_hotlist)); @@ -859,19 +855,12 @@ buflist_config_free () } } - if (buflist_config_format_buffer_eval) - { - free (buflist_config_format_buffer_eval); - buflist_config_format_buffer_eval = NULL; - } - if (buflist_config_format_buffer_current_eval) - { - free (buflist_config_format_buffer_current_eval); - buflist_config_format_buffer_current_eval = NULL; - } - if (buflist_config_format_hotlist_eval) - { - free (buflist_config_format_hotlist_eval); - buflist_config_format_hotlist_eval = NULL; - } + free (buflist_config_format_buffer_eval); + buflist_config_format_buffer_eval = NULL; + + free (buflist_config_format_buffer_current_eval); + buflist_config_format_buffer_current_eval = NULL; + + free (buflist_config_format_hotlist_eval); + buflist_config_format_hotlist_eval = NULL; } |