]> granicus.if.org Git - graphviz/commitdiff
remove unnecessary cast in agraphof
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 5 Jul 2021 23:56:06 +0000 (16:56 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 11 Jul 2021 23:04:25 +0000 (16:04 -0700)
The input void* argument implicitly coerces to the Agraph_t* return type.

lib/cgraph/obj.c

index 8d22f5f35c8ab7141a7fbf22cf2eece5fc0df898..cf7b7d9809dcf3f3ac3c0044b7241f350c17fae1 100644 (file)
@@ -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;