]> granicus.if.org Git - graphviz/commitdiff
remove unnecessary cast of a parameter to realloc()
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 29 Oct 2020 02:54:31 +0000 (19:54 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 4 Nov 2020 16:02:39 +0000 (08:02 -0800)
This implicitly coerces to void*.

lib/pathplan/shortest.c

index c6d4efaaeabd630fc33e0476fae5f1ffff388f91..188fda7b6dabf840220ed710b7d82eae59d1ecc1 100644 (file)
@@ -563,7 +563,7 @@ static int growops(int newopn)
 {
     if (newopn <= opn)
        return 0;
-    if (!(ops = realloc((void *) ops, POINTSIZE * newopn))) {
+    if (!(ops = realloc(ops, POINTSIZE * newopn))) {
        prerror("cannot realloc ops");
        return -1;
     }