]> granicus.if.org Git - graphviz/commitdiff
common: remove unnecessary parens
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 28 Jan 2023 16:48:50 +0000 (08:48 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 30 Jan 2023 15:43:10 +0000 (07:43 -0800)
lib/common/psusershape.c

index 17b986056f2e33f846b87b8787ed91f2d67b3229..3ad9d7a056dfc8cd9b0d8c362085b3a652b59fe8 100644 (file)
@@ -60,7 +60,7 @@ static usershape_t *user_init(const char *str)
            (line, "%%%%BoundingBox: %d %d %d %d", &lx, &ly, &ux, &uy) == 4) {
            saw_bb = true;
        }
-       if ((line[0] != '%') && strstr(line,"read")) must_inline = true;
+       if (line[0] != '%' && strstr(line,"read")) must_inline = true;
        if (saw_bb && must_inline) break;
     }
 
@@ -112,8 +112,8 @@ void epsf_init(node_t * n)
        ND_height(n) = PS2INCH(dy);
        ND_shape_info(n) = desc = NEW(epsf_t);
        desc->macro_id = us->macro_id;
-       desc->offset.x = -us->x - (dx) / 2;
-       desc->offset.y = -us->y - (dy) / 2;
+       desc->offset.x = -us->x - dx / 2;
+       desc->offset.y = -us->y - dy / 2;
     } else
        agerr(AGWARN, "shapefile not set or not found for epsf node %s\n", agnameof(n));
 }
@@ -144,7 +144,7 @@ void cat_libfile(GVJ_t * job, const char **arglib, const char **stdlib)
 
     /* check for empty string to turn off stdlib */
     if (arglib) {
-        for (i = 0; use_stdlib && ((p = arglib[i])); i++) {
+        for (i = 0; use_stdlib && (p = arglib[i]); i++) {
             if (*p == '\0')
                 use_stdlib = false;
         }
@@ -297,7 +297,7 @@ char *ps_string(char *ins, int chset)
     agxbputc (&xb, LPAREN);
     s = base;
     while (*s) {
-        if ((*s == LPAREN) || (*s == RPAREN) || (*s == '\\'))
+        if (*s == LPAREN || *s == RPAREN || *s == '\\')
             agxbputc (&xb, '\\');
         agxbputc (&xb, *s++);
     }