mirror of
https://github.com/weechat/weechat.git
synced 2026-06-29 06:16:40 +02:00
Removed sizeof(char) and useless type casts from void* to another pointer type (patch from Leonid Evdokimov)
This commit is contained in:
@@ -45,7 +45,7 @@ t_weechat_trigger *weechat_trigger_alloc (char *pattern, char *domain, char *com
|
||||
{
|
||||
t_weechat_trigger *new;
|
||||
|
||||
new = (t_weechat_trigger *)malloc (sizeof (t_weechat_trigger));
|
||||
new = malloc (sizeof (*new));
|
||||
if (new)
|
||||
{
|
||||
new->pattern = strdup (pattern);
|
||||
@@ -733,7 +733,7 @@ weechat_trigger_edit (t_weechat_plugin *plugin, int todo)
|
||||
return -1;
|
||||
|
||||
len = strlen (weechat_dir) + strlen(DIR_SEP) + strlen(CONF_FILE) + 1;
|
||||
triggerrc = (char *)malloc (len * sizeof(char));
|
||||
triggerrc = malloc (len);
|
||||
if (!triggerrc)
|
||||
return -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user