From: Matthew Fernandez Date: Fri, 4 Jun 2021 00:19:13 +0000 (-0700) Subject: remove unnecessary strdup casts in Lefty’s yylex X-Git-Tag: 2.47.3~5^2~8 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7cb1e19ce91dc64520925e61677a0ac48899fc57;p=graphviz remove unnecessary strdup casts in Lefty’s yylex strdup already returns a char*. --- diff --git a/cmd/lefty/dot2l/dotlex.c b/cmd/lefty/dot2l/dotlex.c index c404913ad..a3de2431f 100644 --- a/cmd/lefty/dot2l/dotlex.c +++ b/cmd/lefty/dot2l/dotlex.c @@ -84,14 +84,14 @@ int yylex (void) { /* scan quoted strings */ if (lexptr[0] == '\"') { lexptr = quoted_string (lexptr); - yylval.s = (char *) strdup (lexbuf); + yylval.s = strdup (lexbuf); return T_id; } /* scan html strings */ if (lexptr[0] == '<') { lexptr = html_string (lexptr); - yylval.s = (char *) strdup (lexbuf); + yylval.s = strdup (lexbuf); return T_id; }