]> diplodocus.org Git - nmh/blobdiff - sbr/vfgets.c
mhbuildsbr.c: Flip logic, moving goto to then-block; no need for else.
[nmh] / sbr / vfgets.c
index 3a376e10d6614fa3c1274359d5a78dd8dc7562a0..480af1394362fdb12daf85cb7fafe9beddd66a0f 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * vfgets.c -- virtual fgets
+/* vfgets.c -- virtual fgets
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -40,15 +38,13 @@ wrong_guess:
            if (*dp == '\n') {
                *bp = pp;
                return 0;
-           } else {
-               cp = ++dp;
            }
+            cp = ++dp;
        } else {
            for (fp = dp - 1, toggle = 0; fp >= cp; fp--) {
                if (*fp != QUOTE)
                    break;
-               else
-                   toggle = !toggle;
+                toggle = !toggle;
            }
            if (toggle)
                goto wrong_guess;