gbranden pushed a commit to branch master
in repository groff.

commit 723ea3203726c08df85d317da72902cdc25bc964
Author: G. Branden Robinson <g.branden.robin...@gmail.com>
AuthorDate: Sun Mar 2 12:47:56 2025 -0600

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

diff --git a/ChangeLog b/ChangeLog
index 84f6ca9cb..bd21ecc59 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-03-02  G. Branden Robinson <g.branden.robin...@gmail.com>
+
+       * src/roff/troff/node.h (node::node): Fix code style nit;
+       explicitly compare variable of pointer type to null pointer
+       literal instead of letting it pun down to a Boolean.
+
 2025-03-02  G. Branden Robinson <g.branden.robin...@gmail.com>
 
        * src/roff/troff/node.cpp (hline_node::~hline_node)
diff --git a/src/roff/troff/node.h b/src/roff/troff/node.h
index fe96fa1c6..a56714777 100644
--- a/src/roff/troff/node.h
+++ b/src/roff/troff/node.h
@@ -138,7 +138,7 @@ inline node::node(node *n, statem *s, int divlevel)
   push_state(0 /* nullptr */),
   div_nest_level(divlevel), is_special(false)
 {
-  if (s)
+  if (s != 0 /* nullptr */)
     state = new statem(s);
   else
     state = 0 /* nullptr */;

_______________________________________________
groff-commit mailing list
groff-commit@gnu.org
https://lists.gnu.org/mailman/listinfo/groff-commit

Reply via email to