summaryrefslogtreecommitdiff
path: root/src/plugins/irc
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/irc')
-rw-r--r--src/plugins/irc/irc-batch.c6
-rw-r--r--src/plugins/irc/irc-color.c3
-rw-r--r--src/plugins/irc/irc-command.c15
-rw-r--r--src/plugins/irc/irc-config.c15
-rw-r--r--src/plugins/irc/irc-join.c9
-rw-r--r--src/plugins/irc/irc-list.c3
-rw-r--r--src/plugins/irc/irc-message.c15
-rw-r--r--src/plugins/irc/irc-mode.c6
-rw-r--r--src/plugins/irc/irc-protocol.c3
-rw-r--r--src/plugins/irc/irc-redirect.c4
-rw-r--r--src/plugins/irc/irc-sasl.c3
-rw-r--r--src/plugins/irc/irc-server.c9
12 files changed, 30 insertions, 61 deletions
diff --git a/src/plugins/irc/irc-batch.c b/src/plugins/irc/irc-batch.c
index a2346f8d7..b3ed06e64 100644
--- a/src/plugins/irc/irc-batch.c
+++ b/src/plugins/irc/irc-batch.c
@@ -456,8 +456,7 @@ irc_batch_process_multiline (struct t_irc_server *server,
end:
weechat_hashtable_free (hash_tags);
- if (list_messages)
- weechat_string_free_split (list_messages);
+ weechat_string_free_split (list_messages);
return weechat_string_dyn_free (result, 0);
}
@@ -500,8 +499,7 @@ irc_batch_modifier_cb (const void *pointer, void *data,
result = irc_batch_process_multiline (ptr_server, string, items[2]);
}
}
- if (items)
- weechat_string_free_split (items);
+ weechat_string_free_split (items);
return (result) ? result : strdup (string);
}
diff --git a/src/plugins/irc/irc-color.c b/src/plugins/irc/irc-color.c
index 8c92d77ac..c4d263165 100644
--- a/src/plugins/irc/irc-color.c
+++ b/src/plugins/irc/irc-color.c
@@ -919,8 +919,7 @@ irc_color_decode_ansi_cb (void *data, const char *text)
}
end:
- if (items)
- weechat_string_free_split (items);
+ weechat_string_free_split (items);
free (text2);
return (output) ? output : strdup ("");
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c
index b8f2099cc..663234ef9 100644
--- a/src/plugins/irc/irc-command.c
+++ b/src/plugins/irc/irc-command.c
@@ -705,8 +705,7 @@ irc_command_exec_all_channels (struct t_irc_server *server,
irc_command_exec_buffers (list_buffers, command);
weechat_list_free (list_buffers);
- if (channels)
- weechat_string_free_split (channels);
+ weechat_string_free_split (channels);
}
/*
@@ -931,8 +930,7 @@ irc_command_exec_all_servers (int inclusive, const char *str_servers, const char
irc_command_exec_buffers (list_buffers, command);
weechat_list_free (list_buffers);
- if (servers)
- weechat_string_free_split (servers);
+ weechat_string_free_split (servers);
}
/*
@@ -1465,10 +1463,8 @@ irc_command_run_away (const void *pointer, void *data,
irc_command_away (pointer, data, buffer, argc, argv, argv_eol);
}
- if (argv)
- weechat_string_free_split (argv);
- if (argv_eol)
- weechat_string_free_split (argv_eol);
+ weechat_string_free_split (argv);
+ weechat_string_free_split (argv_eol);
return WEECHAT_RC_OK;
}
@@ -3002,8 +2998,7 @@ irc_command_join_server (struct t_irc_server *server, const char *arguments,
weechat_string_free_split (channels);
}
- if (keys)
- weechat_string_free_split (keys);
+ weechat_string_free_split (keys);
}
/*
diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c
index b96235348..a09bceac8 100644
--- a/src/plugins/irc/irc-config.c
+++ b/src/plugins/irc/irc-config.c
@@ -1219,12 +1219,9 @@ irc_config_check_autojoin (const char *autojoin)
end:
free (string);
- if (items)
- weechat_string_free_split (items);
- if (channels)
- weechat_string_free_split (channels);
- if (keys)
- weechat_string_free_split (keys);
+ weechat_string_free_split (items);
+ weechat_string_free_split (channels);
+ weechat_string_free_split (keys);
return rc;
}
@@ -1773,10 +1770,8 @@ irc_config_ignore_read_cb (const void *pointer, void *data,
{
irc_ignore_new (argv_eol[2], argv[0], argv[1]);
}
- if (argv)
- weechat_string_free_split (argv);
- if (argv_eol)
- weechat_string_free_split (argv_eol);
+ weechat_string_free_split (argv);
+ weechat_string_free_split (argv_eol);
}
}
diff --git a/src/plugins/irc/irc-join.c b/src/plugins/irc/irc-join.c
index c9e028a62..9889e40eb 100644
--- a/src/plugins/irc/irc-join.c
+++ b/src/plugins/irc/irc-join.c
@@ -374,12 +374,9 @@ irc_join_split (struct t_irc_server *server, const char *join,
}
end:
- if (items)
- weechat_string_free_split (items);
- if (channels)
- weechat_string_free_split (channels);
- if (keys)
- weechat_string_free_split (keys);
+ weechat_string_free_split (items);
+ weechat_string_free_split (channels);
+ weechat_string_free_split (keys);
return arraylist;
}
diff --git a/src/plugins/irc/irc-list.c b/src/plugins/irc/irc-list.c
index abef27d57..98e9b994b 100644
--- a/src/plugins/irc/irc-list.c
+++ b/src/plugins/irc/irc-list.c
@@ -448,8 +448,7 @@ irc_list_parse_messages (struct t_irc_server *server, const char *output)
}
}
free (command);
- if (params)
- weechat_string_free_split (params);
+ weechat_string_free_split (params);
}
weechat_string_free_split (irc_msgs);
diff --git a/src/plugins/irc/irc-message.c b/src/plugins/irc/irc-message.c
index d908716be..2dc822f1f 100644
--- a/src/plugins/irc/irc-message.c
+++ b/src/plugins/irc/irc-message.c
@@ -520,8 +520,7 @@ irc_message_parse_to_hashtable (struct t_irc_server *server,
free (channel);
free (arguments);
free (text);
- if (params)
- weechat_string_free_split (params);
+ weechat_string_free_split (params);
return hashtable;
}
@@ -1282,10 +1281,8 @@ irc_message_split_join (struct t_irc_message_split_context *context,
msg_to_send + length_no_channel + 1);
}
- if (channels)
- weechat_string_free_split (channels);
- if (keys)
- weechat_string_free_split (keys);
+ weechat_string_free_split (channels);
+ weechat_string_free_split (keys);
return 1;
}
@@ -1828,10 +1825,8 @@ end:
}
free (tags);
- if (argv)
- weechat_string_free_split (argv);
- if (argv_eol)
- weechat_string_free_split (argv_eol);
+ weechat_string_free_split (argv);
+ weechat_string_free_split (argv_eol);
return split_context.hashtable;
}
diff --git a/src/plugins/irc/irc-mode.c b/src/plugins/irc/irc-mode.c
index 09eb0fe71..ea7337266 100644
--- a/src/plugins/irc/irc-mode.c
+++ b/src/plugins/irc/irc-mode.c
@@ -315,8 +315,7 @@ end:
free (new_modes);
free (new_args);
free (str_modes);
- if (argv)
- weechat_string_free_split (argv);
+ weechat_string_free_split (argv);
if (channel->modes && (strcmp (channel->modes, "+") == 0))
{
free (channel->modes);
@@ -562,8 +561,7 @@ irc_mode_channel_set (struct t_irc_server *server,
pos++;
}
- if (argv)
- weechat_string_free_split (argv);
+ weechat_string_free_split (argv);
if (channel_modes_updated)
weechat_bar_item_update ("buffer_modes");
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 57dcc9e03..16988abbc 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -6291,8 +6291,7 @@ IRC_PROTOCOL_CALLBACK(353)
free (str_params);
if (str_nicks)
weechat_string_dyn_free (str_nicks, 1);
- if (nicks)
- weechat_string_free_split (nicks);
+ weechat_string_free_split (nicks);
return WEECHAT_RC_OK;
}
diff --git a/src/plugins/irc/irc-redirect.c b/src/plugins/irc/irc-redirect.c
index 456c03581..0ebdc61d8 100644
--- a/src/plugins/irc/irc-redirect.c
+++ b/src/plugins/irc/irc-redirect.c
@@ -923,9 +923,7 @@ irc_redirect_message (struct t_irc_server *server, const char *message,
}
end:
- if (arguments_argv)
- weechat_string_free_split (arguments_argv);
-
+ weechat_string_free_split (arguments_argv);
return rc;
}
diff --git a/src/plugins/irc/irc-sasl.c b/src/plugins/irc/irc-sasl.c
index 75f7e252c..5028794fa 100644
--- a/src/plugins/irc/irc-sasl.c
+++ b/src/plugins/irc/irc-sasl.c
@@ -431,8 +431,7 @@ end:
free (username);
free (username2);
free (data);
- if (attrs)
- weechat_string_free_split (attrs);
+ weechat_string_free_split (attrs);
free (nonce_server);
free (salt_base64);
free (salt);
diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c
index 066f11ab3..cfe2cd632 100644
--- a/src/plugins/irc/irc-server.c
+++ b/src/plugins/irc/irc-server.c
@@ -2289,8 +2289,7 @@ irc_server_free_data (struct t_irc_server *server)
}
free (server->name);
free (server->addresses_eval);
- if (server->addresses_array)
- weechat_string_free_split (server->addresses_array);
+ weechat_string_free_split (server->addresses_array);
free (server->ports_array);
free (server->retry_array);
free (server->current_address);
@@ -2302,8 +2301,7 @@ irc_server_free_data (struct t_irc_server *server)
weechat_unhook (server->hook_timer_anti_flood);
irc_server_free_sasl_data (server);
free (server->unterminated_message);
- if (server->nicks_array)
- weechat_string_free_split (server->nicks_array);
+ weechat_string_free_split (server->nicks_array);
free (server->nick);
free (server->nick_modes);
free (server->host);
@@ -2315,8 +2313,7 @@ irc_server_free_data (struct t_irc_server *server)
free (server->chantypes);
free (server->chanmodes);
free (server->clienttagdeny);
- if (server->clienttagdeny_array)
- weechat_string_free_split (server->clienttagdeny_array);
+ weechat_string_free_split (server->clienttagdeny_array);
free (server->away_message);
if (server->cmd_list_regexp)
{