diff options
-rw-r--r-- | src/plugins/relay/irc/relay-irc.c | 7 | ||||
-rw-r--r-- | src/plugins/relay/weechat/relay-weechat.c | 6 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c index a088646d3..99fb0f32b 100644 --- a/src/plugins/relay/irc/relay-irc.c +++ b/src/plugins/relay/irc/relay-irc.c @@ -1773,13 +1773,12 @@ relay_irc_close_connection (struct t_relay_client *client) void relay_irc_alloc (struct t_relay_client *client) { - struct t_relay_irc_data *irc_data; char *password; password = weechat_string_eval_expression (weechat_config_string (relay_config_network_password), NULL, NULL, NULL); - client->protocol_data = malloc (sizeof (*irc_data)); + client->protocol_data = malloc (sizeof (struct t_relay_irc_data)); if (client->protocol_data) { RELAY_IRC_DATA(client, address) = strdup ("weechat.relay.irc"); @@ -1810,9 +1809,7 @@ void relay_irc_alloc_with_infolist (struct t_relay_client *client, struct t_infolist *infolist) { - struct t_relay_irc_data *irc_data; - - client->protocol_data = malloc (sizeof (*irc_data)); + client->protocol_data = malloc (sizeof (struct t_relay_irc_data)); if (client->protocol_data) { RELAY_IRC_DATA(client, address) = strdup (weechat_infolist_string (infolist, "address")); diff --git a/src/plugins/relay/weechat/relay-weechat.c b/src/plugins/relay/weechat/relay-weechat.c index 2b3ccab7c..84f1e73c4 100644 --- a/src/plugins/relay/weechat/relay-weechat.c +++ b/src/plugins/relay/weechat/relay-weechat.c @@ -166,13 +166,12 @@ relay_weechat_free_buffers_nicklist (struct t_hashtable *hashtable, void relay_weechat_alloc (struct t_relay_client *client) { - struct t_relay_weechat_data *weechat_data; char *password; password = weechat_string_eval_expression (weechat_config_string (relay_config_network_password), NULL, NULL, NULL); - client->protocol_data = malloc (sizeof (*weechat_data)); + client->protocol_data = malloc (sizeof (struct t_relay_weechat_data)); if (client->protocol_data) { RELAY_WEECHAT_DATA(client, password_ok) = (password && password[0]) ? 0 : 1; @@ -212,12 +211,11 @@ void relay_weechat_alloc_with_infolist (struct t_relay_client *client, struct t_infolist *infolist) { - struct t_relay_weechat_data *weechat_data; int index, value; char name[64]; const char *key; - client->protocol_data = malloc (sizeof (*weechat_data)); + client->protocol_data = malloc (sizeof (struct t_relay_weechat_data)); if (client->protocol_data) { /* general stuff */ |