]> granicus.if.org Git - graphviz/commitdiff
neatogen freeNodes: use clearer iteration idiom
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 19 Nov 2022 23:59:14 +0000 (15:59 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 25 Nov 2022 18:30:51 +0000 (10:30 -0800)
lib/neatogen/adjust.c

index 029b3988278b7068290a63f23907608b59eafcb1..e8d2d3d52c97d470f78051b8585f89fade4ae35e 100644 (file)
@@ -74,11 +74,8 @@ static void setBoundBox(Point * ll, Point * ur)
   */
 static void freeNodes(void)
 {
-    Info_t *ip = nodeInfo;
-
     for (size_t i = 0; i < nsites; i++) {
-       breakPoly(&ip->poly);
-       ip++;
+       breakPoly(&nodeInfo[i].poly);
     }
     polyFree();
     infoinit();                        /* Free vertices */