diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-03-23 23:00:04 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-03-23 23:00:04 +0100 |
commit | 57323fa71effad75d78b36a45d5457b1bd782963 (patch) | |
tree | 50d7a5bacacebcdf59d5bf38dff84c83bf557d31 /src/gui/gui-filter.c | |
parent | 14feea7ab84df3e367bc3732e8ba1470e1a3f5a7 (diff) | |
download | weechat-57323fa71effad75d78b36a45d5457b1bd782963.zip |
Removed sizeof(char) and useless type casts from void* to another pointer type (patch from Leonid Evdokimov)
Diffstat (limited to 'src/gui/gui-filter.c')
-rw-r--r-- | src/gui/gui-filter.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/gui-filter.c b/src/gui/gui-filter.c index b5259a788..fc8c96fe9 100644 --- a/src/gui/gui-filter.c +++ b/src/gui/gui-filter.c @@ -271,7 +271,7 @@ gui_filter_new (char *buffer, char *tags, char *regex) if (!regex_prefix) return NULL; - regex1 = (regex_t *)malloc (sizeof (regex_t)); + regex1 = malloc (sizeof (*regex1)); if (regex1) { if (regcomp (regex1, regex_prefix, @@ -283,7 +283,7 @@ gui_filter_new (char *buffer, char *tags, char *regex) } } - regex2 = (regex_t *)malloc (sizeof (regex_t)); + regex2 = malloc (sizeof (*regex2)); if (regex2) { if (regcomp (regex2, pos_regex_message, @@ -301,7 +301,7 @@ gui_filter_new (char *buffer, char *tags, char *regex) } /* create new filter */ - new_filter = (struct t_gui_filter *)(malloc (sizeof (struct t_gui_filter))); + new_filter = (malloc (sizeof (*new_filter))); if (new_filter) { /* init filter */ |