gbranden pushed a commit to branch master
in repository groff.

commit 5f632bc3ad518312b9404f1a7fdd832fd08a3d75
Author: G. Branden Robinson <[email protected]>
AuthorDate: Thu May 21 10:20:46 2026 -0500

    src/roff/troff/input.cpp: Fix code style nits.
    
    * src/roff/troff/input.cpp (do_register_assignment)
      (do_string_assignment): Explicitly compare variable of pointer type to
      null pointer literal instead of letting it pun down to a Boolean.
---
 ChangeLog                | 7 +++++++
 src/roff/troff/input.cpp | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fbcd3fc27..96e5b14bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2026-05-21  G. Branden Robinson <[email protected]>
+
+       * src/roff/troff/input.cpp: Fix code style nits.
+       (do_register_assignment, do_string_assignment): Explicitly
+       compare variable of pointer type to null pointer literal instead
+       of letting it pun down to a Boolean.
+
 2026-05-20  G. Branden Robinson <[email protected]>
 
        * src/roff/troff/div.cpp: Refactor to rationalize and
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 3af87823c..bbcecb4d2 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -9911,7 +9911,7 @@ static int evaluate_expression(const char *expr, units 
*res)
 static void do_register_assignment(const char *s)
 {
   const char *p = strchr(s, '=');
-  if (!p) {
+  if (0 /* nullptr */ == p) {
     char buf[2];
     buf[0] = s[0];
     buf[1] = 0;
@@ -9944,7 +9944,7 @@ static void set_string(const char *name, const char 
*value)
 static void do_string_assignment(const char *s)
 {
   const char *p = strchr(s, '=');
-  if (!p) {
+  if (0 /* nullptr */ == p) {
     char buf[2];
     buf[0] = s[0];
     buf[1] = 0;

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

Reply via email to