]> granicus.if.org Git - graphviz/commitdiff
curveTo: remove shadowing of global 'path' variable
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 29 Aug 2021 19:29:36 +0000 (12:29 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 4 Sep 2021 03:28:41 +0000 (20:28 -0700)
lib/common/ellipse.c

index c813a83a1a19810f59bd8c4b94708d000c7c146a..e9eed72b4560cdbf52e32ed99eb540c45ab8e8cc 100644 (file)
@@ -410,19 +410,19 @@ static void moveTo(Ppolyline_t *polypath, double x, double y)
 }
 
 static void
-curveTo(Ppolyline_t * path, double x1, double y1,
+curveTo(Ppolyline_t *polypath, double x1, double y1,
        double x2, double y2, double x3, double y3)
 {
-    if (path->pn + 3 >= bufsize) {
+    if (polypath->pn + 3 >= bufsize) {
        bufsize *= 2;
-       path->ps = realloc(path->ps, bufsize * sizeof(pointf));
+       polypath->ps = realloc(polypath->ps, bufsize * sizeof(pointf));
     }
-    path->ps[path->pn].x = x1;
-    path->ps[path->pn++].y = y1;
-    path->ps[path->pn].x = x2;
-    path->ps[path->pn++].y = y2;
-    path->ps[path->pn].x = x3;
-    path->ps[path->pn++].y = y3;
+    polypath->ps[polypath->pn].x = x1;
+    polypath->ps[polypath->pn++].y = y1;
+    polypath->ps[polypath->pn].x = x2;
+    polypath->ps[polypath->pn++].y = y2;
+    polypath->ps[polypath->pn].x = x3;
+    polypath->ps[polypath->pn++].y = y3;
 }
 
 static void lineTo(Ppolyline_t *polypath, double x, double y)