From: Matthew Fernandez Date: Mon, 5 Jul 2021 23:56:06 +0000 (-0700) Subject: remove unnecessary cast in agraphof X-Git-Tag: 2.48.0~3^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ed11766b127a560ade5f78c502ad7d61d425107b;p=graphviz remove unnecessary cast in agraphof The input void* argument implicitly coerces to the Agraph_t* return type. --- diff --git a/lib/cgraph/obj.c b/lib/cgraph/obj.c index 8d22f5f35..cf7b7d980 100644 --- a/lib/cgraph/obj.c +++ b/lib/cgraph/obj.c @@ -191,7 +191,7 @@ Agraph_t *agraphof(void *obj) case AGNODE: return ((Agnode_t *) obj)->root; case AGRAPH: - return (Agraph_t *) obj; + return obj; default: /* actually can't occur if only 2 bit tags */ agerr(AGERR, "agraphof a bad object"); return NULL;