]> granicus.if.org Git - graphviz/commitdiff
neatogen updateGraph: use a clearer iteration idiom
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 20 Nov 2022 00:22:09 +0000 (16:22 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 25 Nov 2022 18:33:31 +0000 (10:33 -0800)
lib/neatogen/adjust.c

index f4c99b65405750fe0cbe84b6dbcf4ba56c57e9b0..08c9d18639bc607ff24cab9f01b71a34e46074b1 100644 (file)
@@ -583,13 +583,10 @@ static int sAdjust(void)
   */
 static void updateGraph(void)
 {
-    Info_t *ip;
-
-    ip = nodeInfo;
     for (size_t i = 0; i < nsites; i++) {
+       Info_t *ip = &nodeInfo[i];
        ND_pos(ip->node)[0] = ip->site.coord.x;
        ND_pos(ip->node)[1] = ip->site.coord.y;
-       ip++;
     }
 }