1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 07:16:37 +02:00

Removed sizeof(char) and useless type casts from void* to another pointer type (patch from Leonid Evdokimov)

This commit is contained in:
Sebastien Helleu
2008-03-23 23:00:04 +01:00
parent 14feea7ab8
commit 57323fa71e
64 changed files with 273 additions and 285 deletions
+2 -2
View File
@@ -247,7 +247,7 @@ plugin_load (char *filename)
}
/* create new plugin */
new_plugin = (struct t_weechat_plugin *)malloc (sizeof (struct t_weechat_plugin));
new_plugin = malloc (sizeof (*new_plugin));
if (new_plugin)
{
/* variables */
@@ -513,7 +513,7 @@ plugin_auto_load ()
}
/* auto-load plugins in WeeChat global lib dir */
dir_name = (char *)malloc ((strlen (WEECHAT_LIBDIR) + 16) * sizeof (char));
dir_name = malloc (strlen (WEECHAT_LIBDIR) + 16);
if (dir_name)
{
snprintf (dir_name, strlen (WEECHAT_LIBDIR) + 16,