summaryrefslogtreecommitdiff
path: root/src/core/core-upgrade.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core-upgrade.c')
-rw-r--r--src/core/core-upgrade.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/core/core-upgrade.c b/src/core/core-upgrade.c
index ed03302dc..b512969d0 100644
--- a/src/core/core-upgrade.c
+++ b/src/core/core-upgrade.c
@@ -462,8 +462,7 @@ upgrade_weechat_read_buffer (struct t_infolist *infolist)
upgrade_set_current_buffer = ptr_buffer;
/* name for upgrade */
- if (ptr_buffer->plugin_name_for_upgrade)
- free (ptr_buffer->plugin_name_for_upgrade);
+ free (ptr_buffer->plugin_name_for_upgrade);
ptr_buffer->plugin_name_for_upgrade =
strdup (infolist_string (infolist, "plugin_name"));
@@ -471,14 +470,12 @@ upgrade_weechat_read_buffer (struct t_infolist *infolist)
gui_buffer_build_full_name (ptr_buffer);
/* old full name */
- if (ptr_buffer->old_full_name)
- free (ptr_buffer->old_full_name);
+ free (ptr_buffer->old_full_name);
str = infolist_string (infolist, "old_full_name");
ptr_buffer->old_full_name = (str) ? strdup (str) : NULL;
/* short name */
- if (ptr_buffer->short_name)
- free (ptr_buffer->short_name);
+ free (ptr_buffer->short_name);
str = infolist_string (infolist, "short_name");
ptr_buffer->short_name = (str) ? strdup (str) : NULL;
@@ -521,8 +518,7 @@ upgrade_weechat_read_buffer (struct t_infolist *infolist)
/* title (not for main buffer, because there's the latest version) */
if (!main_buffer)
{
- if (ptr_buffer->title)
- free (ptr_buffer->title);
+ free (ptr_buffer->title);
str = infolist_string (infolist, "title");
ptr_buffer->title = (str) ? strdup (str) : NULL;
}