summaryrefslogtreecommitdiff
path: root/src/plugins/trigger
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/trigger')
-rw-r--r--src/plugins/trigger/trigger-libc.c14
-rw-r--r--src/plugins/trigger/trigger.c4
2 files changed, 9 insertions, 9 deletions
diff --git a/src/plugins/trigger/trigger-libc.c b/src/plugins/trigger/trigger-libc.c
index d8b278660..d34c3871a 100644
--- a/src/plugins/trigger/trigger-libc.c
+++ b/src/plugins/trigger/trigger-libc.c
@@ -217,8 +217,8 @@ c_explode_string (char *string, char *separators, int num_items_max,
}
array =
- (char **) malloc ((num_items_max ? n_items : n_items + 1) *
- sizeof (char *));
+ (char **)malloc ((num_items_max ? n_items : n_items + 1) *
+ sizeof (char *));
ptr1 = string;
ptr2 = string;
@@ -241,7 +241,7 @@ c_explode_string (char *string, char *separators, int num_items_max,
if (ptr2 - ptr1 > 0)
{
array[i] =
- (char *) malloc ((ptr2 - ptr1 + 1) * sizeof (char));
+ (char *)malloc ((ptr2 - ptr1 + 1) * sizeof (char));
array[i] = strncpy (array[i], ptr1, ptr2 - ptr1);
array[i][ptr2 - ptr1] = '\0';
ptr1 = ++ptr2;
@@ -310,11 +310,11 @@ c_split_multi_command (char *command, char sep)
ptr = ++p;
}
- array = (char **) malloc ((nb_substr + 1) * sizeof(char *));
+ array = (char **)malloc ((nb_substr + 1) * sizeof(char *));
if (!array)
return NULL;
- buffer = (char *) malloc ( (strlen(command) + 1) * sizeof (char));
+ buffer = (char *)malloc ((strlen(command) + 1) * sizeof (char));
if (!buffer)
{
free (array);
@@ -364,7 +364,7 @@ c_split_multi_command (char *command, char sep)
free (buffer);
- array = (char **) realloc (array, (arr_idx + 1) * sizeof(char *));
+ array = (char **)realloc (array, (arr_idx + 1) * sizeof(char *));
return array;
}
@@ -406,7 +406,7 @@ c_join_string(char **list, char *sep)
len += strlen (list[i]);
len += i*strlen (sep) + 1;
- str = (char *) malloc (len * sizeof(char));
+ str = (char *)malloc (len * sizeof(char));
if (str)
{
for (i = 0; list[i]; i++)
diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c
index 44b410af3..2fc7a1851 100644
--- a/src/plugins/trigger/trigger.c
+++ b/src/plugins/trigger/trigger.c
@@ -37,7 +37,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 = (t_weechat_trigger *)malloc (sizeof (t_weechat_trigger));
if (new)
{
new->pattern = strdup (pattern);
@@ -725,7 +725,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 = (char *)malloc (len * sizeof(char));
if (!triggerrc)
return -1;