From: Matthew Fernandez Date: Sun, 6 Mar 2022 22:44:48 +0000 (-0800) Subject: epsf_emit_body: remove local 'c' X-Git-Tag: 4.0.0~188^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a37183abd63c96a128096ae67d837d533c49e063;p=graphviz epsf_emit_body: remove local 'c' This did not seem to be aiding readability. --- diff --git a/lib/common/psusershape.c b/lib/common/psusershape.c index 116c5f34e..3ec377035 100644 --- a/lib/common/psusershape.c +++ b/lib/common/psusershape.c @@ -188,22 +188,20 @@ void cat_libfile(GVJ_t * job, const char **arglib, const char **stdlib) */ void epsf_emit_body(GVJ_t *job, usershape_t *us) { - char *p; - char c; - p = us->data; + char *p = us->data; while (*p) { /* skip %%EOF lines */ if (!strncasecmp(p, "%%EOF", 5) || !strncasecmp(p, "%%BEGIN", 7) || !strncasecmp(p, "%%END", 5) || !strncasecmp(p, "%%TRAILER", 9)) { /* check for *p since last line might not end in '\n' */ - while ((c = *p) && (c != '\r') && (c != '\n')) p++; + while (*p != '\0' && *p != '\r' && *p != '\n') p++; if ((*p == '\r') && (*(p+1) == '\n')) p += 2; else if (*p) p++; continue; } /* output line */ - while ((c = *p) && (c != '\r') && (c != '\n')) { - gvputc(job, c); + while (*p != '\0' && *p != '\r' && *p != '\n') { + gvputc(job, *p); p++; } if ((*p == '\r') && (*(p+1) == '\n')) p += 2;