1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 02:33:12 +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
+3 -5
View File
@@ -75,8 +75,7 @@ plugin_config_search (char *plugin_name, char *option_name)
char *internal_option;
struct t_config_option *ptr_option;
internal_option = (char *)malloc ((strlen (plugin_name) +
strlen (option_name) + 2) * sizeof (char));
internal_option = malloc (strlen (plugin_name) + strlen (option_name) + 2);
if (!internal_option)
return NULL;
@@ -154,7 +153,7 @@ plugin_config_set_internal (char *option, char *value)
{
if (value && value[0])
{
ptr_option = (struct t_config_option *)malloc (sizeof (struct t_config_option));
ptr_option = malloc (sizeof (*ptr_option));
if (ptr_option)
{
/* create new option */
@@ -223,8 +222,7 @@ plugin_config_set (char *plugin_name, char *option_name, char *value)
char *internal_option;
int return_code;
internal_option = (char *)malloc ((strlen (plugin_name) +
strlen (option_name) + 2) * sizeof (char));
internal_option = malloc (strlen (plugin_name) + strlen (option_name) + 2);
if (!internal_option)
return 0;