From: Matthew Fernandez Date: Fri, 4 Jun 2021 00:21:07 +0000 (-0700) Subject: remove unnecessary realloc result cast in gmlscan.l X-Git-Tag: 2.47.3~5^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a394aa203bde94396a563d51dfe3deb3149cb9b3;p=graphviz remove unnecessary realloc result cast in gmlscan.l This input is only used to generate a lexer in C. In C, void pointers (as is the result of realloc) implicitly coerce to all other pointer types. --- diff --git a/cmd/tools/gmlscan.l b/cmd/tools/gmlscan.l index 41fb16aa4..a04c8b71f 100644 --- a/cmd/tools/gmlscan.l +++ b/cmd/tools/gmlscan.l @@ -62,7 +62,7 @@ static void addstr(char *src) long sz = Send - Sbuf; long off = Sptr - Sbuf; sz *= 2; - Sbuf = (char*)realloc(Sbuf,sz); + Sbuf = realloc(Sbuf,sz); Send = Sbuf + sz; Sptr = Sbuf + off; }