From: Matthew Fernandez Date: Fri, 4 Jun 2021 00:19:55 +0000 (-0700) Subject: remove unnecessary casts of allocation results in gmlparse.y X-Git-Tag: 2.47.3~5^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e9d51df4c6a6e75186fc764768811c62df4d2891;p=graphviz remove unnecessary casts of allocation results in gmlparse.y These functions all return void pointers and this input is only used for generating a parser in C. In C, void pointers implicitly coerce to all other pointers. --- diff --git a/cmd/tools/gmlparse.y b/cmd/tools/gmlparse.y index ee22c34fa..7dfc64e4d 100644 --- a/cmd/tools/gmlparse.y +++ b/cmd/tools/gmlparse.y @@ -25,9 +25,9 @@ #include #include -#define NEW(t) (t*)malloc(sizeof(t)) -#define N_NEW(n,t) (t*)calloc((n),sizeof(t)) -#define RALLOC(size,ptr,type) ((type*)realloc(ptr,(size)*sizeof(type))) +#define NEW(t) malloc(sizeof(t)) +#define N_NEW(n,t) calloc((n),sizeof(t)) +#define RALLOC(size,ptr,type) realloc(ptr,(size)*sizeof(type)) typedef unsigned short ushort;