diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-03-23 23:00:04 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-03-23 23:00:04 +0100 |
commit | 57323fa71effad75d78b36a45d5457b1bd782963 (patch) | |
tree | 50d7a5bacacebcdf59d5bf38dff84c83bf557d31 /src/plugins/irc/irc-command.c | |
parent | 14feea7ab84df3e367bc3732e8ba1470e1a3f5a7 (diff) | |
download | weechat-57323fa71effad75d78b36a45d5457b1bd782963.zip |
Removed sizeof(char) and useless type casts from void* to another pointer type (patch from Leonid Evdokimov)
Diffstat (limited to 'src/plugins/irc/irc-command.c')
-rw-r--r-- | src/plugins/irc/irc-command.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index d246d4dfe..437714cdf 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -119,7 +119,7 @@ irc_command_mode_nicks (struct t_irc_server *server, char *channel, for (i = 1; i < argc; i++) length += strlen (argv[i]) + 1; length += strlen (channel) + (argc * strlen (mode)) + 32; - command = (char *)malloc (length * sizeof (char)); + command = malloc (length); if (command) { snprintf (command, length, "MODE %s %s", channel, set); @@ -258,7 +258,7 @@ irc_command_away_server (struct t_irc_server *server, char *arguments) { if (server->away_message) free (server->away_message); - server->away_message = (char *)malloc ((strlen (arguments) + 1) * sizeof (char)); + server->away_message = malloc (strlen (arguments) + 1); if (server->away_message) strcpy (server->away_message, arguments); @@ -1566,7 +1566,7 @@ irc_command_list (void *data, struct t_gui_buffer *buffer, int argc, if (argc > 1) { - ptr_server->cmd_list_regexp = (regex_t *)malloc (sizeof (regex_t)); + ptr_server->cmd_list_regexp = malloc (sizeof (*ptr_server->cmd_list_regexp)); if (ptr_server->cmd_list_regexp) { if ((ret = regcomp (ptr_server->cmd_list_regexp, |