]> granicus.if.org Git - graphviz/commitdiff
epsf_emit_body: remove unnecessary parens and make some comparisons more obvious
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 6 Mar 2022 22:46:51 +0000 (14:46 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 7 Mar 2022 00:39:59 +0000 (16:39 -0800)
lib/common/psusershape.c

index 3ec3770351af3c64ada687ad43e6e18c205aa4ed..a6ce33e983e99ae0589fe0bae2c14d2949614b12 100644 (file)
@@ -195,7 +195,7 @@ void epsf_emit_body(GVJ_t *job, usershape_t *us)
            !strncasecmp(p, "%%END", 5) || !strncasecmp(p, "%%TRAILER", 9)) {
            /* check for *p since last line might not end in '\n' */
            while (*p != '\0' && *p != '\r' && *p != '\n') p++;
-           if ((*p == '\r') && (*(p+1) == '\n')) p += 2;
+           if (*p == '\r' && p[1] == '\n') p += 2;
            else if (*p) p++;
            continue;
        }
@@ -204,7 +204,7 @@ void epsf_emit_body(GVJ_t *job, usershape_t *us)
            gvputc(job, *p);
            p++;
        }
-       if ((*p == '\r') && (*(p+1) == '\n')) p += 2;
+       if (*p == '\r' && p[1] == '\n') p += 2;
        else if (*p) p++;
        gvputc(job, '\n');
     }