]> granicus.if.org Git - graphviz/commitdiff
epsf_emit_body: remove local 'c'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 6 Mar 2022 22:44:48 +0000 (14:44 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 7 Mar 2022 00:39:59 +0000 (16:39 -0800)
This did not seem to be aiding readability.

lib/common/psusershape.c

index 116c5f34eef3241d8b28697aa7b16c67aa85727b..3ec3770351af3c64ada687ad43e6e18c205aa4ed 100644 (file)
@@ -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;