]> granicus.if.org Git - graphviz/commitdiff
gvcolor: remove unnecessary parens
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 13 Nov 2021 03:36:37 +0000 (19:36 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 19 Nov 2021 01:52:33 +0000 (17:52 -0800)
cmd/tools/gvcolor.c

index 42c378c7b8ee4ea380842c2bd56f6920aec0e36c..771300f6f9d1019e4679fd8cfca8e049b73fa50e 100644 (file)
@@ -63,7 +63,7 @@ static int cmpf(Agnode_t ** n0, Agnode_t ** n1)
 static void setcolor(char *p, double *v)
 {
     char buf[64];
-    if ((sscanf(p, "%lf %lf %lf", v, v + 1, v + 2) != 3) && p[0]) {
+    if (sscanf(p, "%lf %lf %lf", v, v + 1, v + 2) != 3 && p[0]) {
        colorxlate(p, buf);
        sscanf(buf, "%lf %lf %lf", v, v + 1, v + 2);
     }
@@ -129,9 +129,9 @@ static void color(Agraph_t * g)
     if ((p = agget(g, "Defcolor")))
        setcolor(p, Defcolor);
 
-    if ((p = agget(g, "rankdir")) && (p[0] == 'L'))
+    if ((p = agget(g, "rankdir")) && p[0] == 'L')
        LR = 1;
-    if ((p = agget(g, "flow")) && (p[0] == 'b'))
+    if ((p = agget(g, "flow")) && p[0] == 'b')
        Forward = 0;
     if ((p = agget(g, "saturation"))) {
        if (sscanf(p, "%lf,%lf", &lowsat, &highsat) == 2) {