From e254f9e0ec8953ce02043642021a7307512c57be Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sat, 5 Jul 2014 12:04:11 -0700 Subject: Remove unnecessary casts on malloc/realloc return values Signed-off-by: Alan Coopersmith --- fslsfonts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fslsfonts.c b/fslsfonts.c index 48d077d..08a7b3a 100644 --- a/fslsfonts.c +++ b/fslsfonts.c @@ -265,11 +265,11 @@ get_list(const char *pattern) return; } if (font_list) - font_list = (FontList *) realloc(font_list, - (font_cnt + available) * sizeof(FontList)); + font_list = realloc(font_list, + (font_cnt + available) * sizeof(FontList)); else - font_list = (FontList *) malloc((unsigned) - (font_cnt + available) * sizeof(FontList)); + font_list = malloc((unsigned) + (font_cnt + available) * sizeof(FontList)); if (font_list == NULL) { fprintf(stderr, "%s: unable to allocate %zu bytes for font list\n", program_name, (font_cnt + available) * sizeof(FontList)); -- cgit v1.2.3