gbranden pushed a commit to branch master
in repository groff.

commit 0e905724697e2476302982d0b58624a80b1ea497
Author: G. Branden Robinson <[email protected]>
AuthorDate: Mon Nov 23 11:13:40 2026 -0600

    src/roff/troff/env.cpp: Fix code style nit.
    
    * src/roff/troff/env.cpp (environment_switch_request): Explicitly
      compare variable of pointer type to ISO C++98 null pointer literal,
      instead of punning it down to a Boolean.
---
 ChangeLog              | 7 +++++++
 src/roff/troff/env.cpp | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index d67949913..d24882b98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-11-23  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/env.cpp (environment_switch_request): Fix code
+       style nit.  Explicitly compare variable of pointer type to ISO
+       C++98 null pointer literal, instead of punning it down to a
+       Boolean.
+
 2026-11-23  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/env.cpp (environment_switch_request):
diff --git a/src/roff/troff/env.cpp b/src/roff/troff/env.cpp
index 1a2c105eb..fe71ba0a9 100644
--- a/src/roff/troff/env.cpp
+++ b/src/roff/troff/env.cpp
@@ -3961,7 +3961,7 @@ static void environment_switch_request() // .ev
     }
     environment *e
       = static_cast<environment *>(env_dictionary.lookup(nm));
-    if (!e) {
+    if (0 /* nullptr */ == e) {
       e = new environment(nm);
       (void) env_dictionary.lookup(nm, e);
     }

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

Reply via email to