]> granicus.if.org Git - graphviz/commitdiff
replace: explicitly brace conditionals
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 11 Aug 2021 01:02:22 +0000 (18:02 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 14 Aug 2021 01:31:32 +0000 (18:31 -0700)
Makes this function a little easier to read.

lib/expr/exeval.c

index 458615db1a15d9a8af973d06267c69f8c11a49c5..e8217ac1577faf267f60a233922b067831fcf41b 100644 (file)
@@ -781,10 +781,12 @@ static void replace(Sfio_t * s, char *base, char *repl, int ng, int *sub) {
           sfwrite(s, base + offset, sub[2 * idx + 1] - offset);
         }
         repl++;
-      } else
+      } else {
         sfputc(s, '\\');
-    } else
+      }
+    } else {
       sfputc(s, c);
+    }
   }
 }