]> granicus.if.org Git - graphviz/commitdiff
lib/neatogen/edges.c: [nfc] remove unnecessary casts
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 27 Nov 2021 18:07:28 +0000 (10:07 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 3 Dec 2021 15:44:09 +0000 (07:44 -0800)
lib/neatogen/edges.c

index 4daed620acc17dc605d93dc4f1f49b20553a8a38..533c9d41c0ba001cdb06ba5bd7f2dfa94e8f6ea8 100644 (file)
@@ -37,8 +37,8 @@ Edge *gvbisect(Site * s1, Site * s2)
     newedge->reg[1] = s2;
     ref(s1);
     ref(s2);
-    newedge->ep[0] = (Site *) NULL;
-    newedge->ep[1] = (Site *) NULL;
+    newedge->ep[0] = NULL;
+    newedge->ep[1] = NULL;
 
     dx = s2->coord.x - s1->coord.x;
     dy = s2->coord.y - s1->coord.y;
@@ -87,7 +87,7 @@ void clip_line(Edge * e)
     }
 
     if (e->a == 1.0) {
-       if (s1 != (Site *) NULL) {
+       if (s1 != NULL) {
            y1 = s1->coord.y;
            if (y1 > pymax)
                return;
@@ -102,7 +102,7 @@ void clip_line(Edge * e)
            x1 = e->c - e->b * y1;
        }
 
-       if (s2 != (Site *) NULL) {
+       if (s2 != NULL) {
            y2 = s2->coord.y;
            if (y2 < pymin)
                return;
@@ -136,7 +136,7 @@ void clip_line(Edge * e)
            y2 = (e->c - x2) / e->b;
        };
     } else {
-       if (s1 != (Site *) NULL) {
+       if (s1 != NULL) {
            x1 = s1->coord.x;
            if (x1 > pxmax)
                return;
@@ -151,7 +151,7 @@ void clip_line(Edge * e)
            y1 = e->c - e->a * x1;
        }
 
-       if (s2 != (Site *) NULL) {
+       if (s2 != NULL) {
            x2 = s2->coord.x;
            if (x2 < pxmin)
                return;
@@ -197,7 +197,7 @@ void endpoint(Edge * e, int lr, Site * s)
 {
     e->ep[lr] = s;
     ref(s);
-    if (e->ep[re - lr] == (Site *) NULL)
+    if (e->ep[re - lr] == NULL)
        return;
     clip_line(e);
 #ifdef STANDALONE