gbranden pushed a commit to branch master
in repository groff.

commit 363f13aa1c08df9350114931ae7666e354cc7406
Author: G. Branden Robinson <[email protected]>
AuthorDate: Fri Mar 20 20:07:35 2026 -0500

    src/roff/troff/input.cpp: Trivially refactor.
    
    * src/roff/troff/input.cpp (abort_request): For clarity, apply
      DeMorgan's Law so that the `if` statement guarding entry to a `for`
      loop matches the expression tested within it.
---
 ChangeLog                | 7 +++++++
 src/roff/troff/input.cpp | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 68b5367cb..8b251f5ea 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-03-20  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (abort_request): Trivially refactor;
+       for clarity, apply DeMorgan's Law so that the `if` statement
+       guarding entry to a `for` loop matches the expression tested
+       within it.
+
 2026-03-20  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp: Improve type discipline with respect
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 5f85c1c65..1d373b181 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -9367,7 +9367,7 @@ void abort_request()
     while ((c = read_char_in_copy_mode(0 /* nullptr */)) == ' ')
       ;
   }
-  if (!((EOF == c) || ('\n' == c))) {
+  if ((c != '\n') && (c != EOF)) {
     for (;
         (c != '\n') && (c != EOF);
         (c = read_char_in_copy_mode(0 /* nullptr */)))

_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to