1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 11:43:13 +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
@@ -526,7 +526,7 @@ command_builtin (void *data, struct t_gui_buffer *buffer,
else
{
length = strlen (argv_eol[1]) + 2;
command = (char *)malloc (length * sizeof (char));
command = malloc (length);
if (command)
{
snprintf (command, length, "/%s", argv_eol[1]);
@@ -1950,7 +1950,7 @@ command_upgrade (void *data, struct t_gui_buffer *buffer,
}
filename_length = strlen (weechat_home) + strlen (WEECHAT_SESSION_NAME) + 2;
filename = (char *)malloc (filename_length * sizeof (char));
filename = malloc (filename_length);
if (!filename)
return -2;
snprintf (filename, filename_length, "%s%s" WEECHAT_SESSION_NAME,