From 57323fa71effad75d78b36a45d5457b1bd782963 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 23 Mar 2008 23:00:04 +0100 Subject: Removed sizeof(char) and useless type casts from void* to another pointer type (patch from Leonid Evdokimov) --- src/gui/gui-filter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/gui-filter.c') 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 */ -- cgit v1.2.3