From 69573660643683607e588bc70551e8e0619cfc3b Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Wed, 28 Oct 2020 19:51:47 -0700 Subject: [PATCH] remove some unnecessary allocation casts These return values implicitly coerce to other pointer types. --- lib/gvc/gvconfig.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/gvc/gvconfig.c b/lib/gvc/gvconfig.c index b1542cc8d..fab5109d1 100644 --- a/lib/gvc/gvconfig.c +++ b/lib/gvc/gvconfig.c @@ -593,7 +593,7 @@ glob (GVC_t* gvc, char* pattern, int flags, int (*errfunc)(const char *, int), g str = realloc (str, arrsize*sizeof(char*)); if (!str) return GLOB_NOSPACE; } - str[cnt] = (char*)malloc (strlen(libdir)+1+strlen(wfd.cFileName)+1); + str[cnt] = malloc (strlen(libdir)+1+strlen(wfd.cFileName)+1); if (!str[cnt]) return GLOB_NOSPACE; strcpy(str[cnt],libdir); strcat(str[cnt],DIRSEP); @@ -603,7 +603,7 @@ glob (GVC_t* gvc, char* pattern, int flags, int (*errfunc)(const char *, int), g str[cnt] = 0; pglob->gl_pathc = cnt; - pglob->gl_pathv = (char**)realloc(str, (cnt+1)*sizeof(char*)); + pglob->gl_pathv = realloc(str, (cnt+1)*sizeof(char*)); return 0; } -- 2.40.0