gbranden pushed a commit to branch master
in repository groff.

commit d042dd7db3fea093355b2f43371e697ac6c55515
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Oct 4 02:36:47 2025 -0500

    [troff]: Fix code style nit.
    
    * src/roff/troff/node.cpp (node::add_char): Compare integer-valued
      variable to integer literal instead of letting it pun down to a
      Boolean.
---
 ChangeLog               | 6 ++++++
 src/roff/troff/node.cpp | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index c783b556b..5ddaec152 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-10-04  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/node.cpp (node::add_char): Compare integer-
+       valued variable to integer literal instead of letting it pun
+       down to a Boolean.
+
 2025-10-04  G. Branden Robinson <[email protected]>
 
        [troff]: Trivially refactor.
diff --git a/src/roff/troff/node.cpp b/src/roff/troff/node.cpp
index 650a31c44..7e983f38a 100644
--- a/src/roff/troff/node.cpp
+++ b/src/roff/troff/node.cpp
@@ -5712,7 +5712,7 @@ node *node::add_char(charinfo *ci, environment *env,
     break_code |= PROHIBITS_BREAK_AFTER;
   if (ci->is_interword_space())
     break_code |= IS_INTERWORD_SPACE;
-  if (break_code) {
+  if (break_code != 0) {
     node *next1 = res->next;
     res->next = 0 /* nullptr */;
     res = new break_char_node(res, break_code, get_break_code(),

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

Reply via email to