gbranden pushed a commit to branch master
in repository groff.

commit 084fb78ddd6f0c62cfc15a2a692b4cb97d352356
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun Nov 16 17:54:51 2025 -0600

    [troff]: Fix code style nit.
    
    * src/roff/troff/input.cpp (margin_character): Explicitly compare value
      of pointer type to null pointer literal instead of letting it pun down
      to a Boolean.
---
 ChangeLog              | 6 ++++++
 src/roff/troff/env.cpp | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index d2d13c6b2..3fb88b1be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-11-16  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp (margin_character): Fix code style
+       nit; explicitly compare value of pointer type to null pointer
+       literal instead of letting it pun down to a Boolean.
+
 2025-11-16  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/input.cpp (hyphenation_patterns_file_code): Fix
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index f17af6067..140f700d7 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -1676,7 +1676,7 @@ void margin_character()
   while (tok.is_space())
     tok.next();
   charinfo *ci = tok.get_char();
-  if (ci) {
+  if (ci != 0 /* nullptr */) {
     // Call tok.next() only after making the node so that
     // .mc \s+9\(br\s0 works.
     node *nd = curenv->make_char_node(ci);

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

Reply via email to