]> granicus.if.org Git - graphviz/commitdiff
gvc: [nfc] remove parens around return value style
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 26 Feb 2022 22:16:26 +0000 (14:16 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 6 Mar 2022 04:06:47 +0000 (20:06 -0800)
This is an idiom occasionally used to allow defining `return` as a macro that
does some additional instrumentation. This style has mostly fallen out of favor,
with mechanisms like `-finstrument-functions` instead used as a more robust way
of achieving the same thing.

lib/gvc/gvdevice.c
lib/gvc/gvevent.c

index 7260cf8832bc8dd796952fe4fd645c820930a472..626d4799149e8516476d3176e9ece282d7338ef9 100644 (file)
@@ -145,7 +145,7 @@ int gvdevice_initialize(GVJ_t * job)
                job->common->errorfn("Could not open \"%s\" for writing : %s\n",
                    job->output_filename, strerror(errno));
                 /* perror(job->output_filename); */
-                return(1);
+                return 1;
             }
         }
         else
@@ -178,12 +178,12 @@ int gvdevice_initialize(GVJ_t * job)
 
        if (deflateInit2(z, Z_DEFAULT_COMPRESSION, Z_DEFLATED, -MAX_WBITS, MAX_MEM_LEVEL, Z_DEFAULT_STRATEGY) != Z_OK) {
            job->common->errorfn("Error initializing for deflation\n");
-           return(1);
+           return 1;
        }
        gvwrite_no_z(job, z_file_header, sizeof(z_file_header));
 #else
        job->common->errorfn("No libz support.\n");
-       return(1);
+       return 1;
 #endif
     }
     return 0;
index 4c8df09dcb18e34285c7476dd5bfe73b84cf51c0..aa095a964d27f21b5d2bf5ee107b969f9a4eb424 100644 (file)
@@ -184,7 +184,7 @@ static graph_t *gvevent_find_cluster(graph_t *g, boxf b)
     for (i = 1; i <= GD_n_cluster(g); i++) {
        sg = gvevent_find_cluster(GD_clust(g)[i], b);
        if (sg)
-           return(sg);
+           return sg;
     }
     B2BF(GD_bb(g), bb);
     if (OVERLAP(b, bb))