From 243c4d8158eddb40e29ca83315e1b25667e6e892 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 6 Mar 2022 14:46:51 -0800 Subject: [PATCH] epsf_emit_body: remove unnecessary parens and make some comparisons more obvious --- lib/common/psusershape.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/common/psusershape.c b/lib/common/psusershape.c index 3ec377035..a6ce33e98 100644 --- a/lib/common/psusershape.c +++ b/lib/common/psusershape.c @@ -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'); } -- 2.40.0