gbranden pushed a commit to branch master
in repository groff.

commit 2960a353b62a877c53b924b58ea97cd32b9e1167
Author: G. Branden Robinson <[email protected]>
AuthorDate: Wed Mar 25 11:58:37 2026 -0500

    [libgroff]: Fix code style nit.
    
    * src/libs/libgroff/change_lf.cpp (change_filename): Parenthesize
      formally complex expressions.
    
    Also annotate null pointer with `nullptr` comment to ease any future
    transition to C++11, which defines it as a keyword.
---
 ChangeLog                       | 5 +++++
 src/libs/libgroff/change_lf.cpp | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index e5b27b6f4..db34acbdd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -19,6 +19,11 @@
        * src/devices/grops/ps.cpp: Drop unnecessary preprocessor
        inclusions of "paper.h" header file.
 
+2026-03-25  G. Branden Robinson <[email protected]>
+
+       * src/libs/libgroff/change_lf.cpp (change_filename):
+       Parenthesize formally complex expressions.
+
 2026-03-25  G. Branden Robinson <[email protected]>
 
        * src/include/htmlhint.h: Drop redundant keyword `extern` from
diff --git a/src/libs/libgroff/change_lf.cpp b/src/libs/libgroff/change_lf.cpp
index 8eb96af40..46d486350 100644
--- a/src/libs/libgroff/change_lf.cpp
+++ b/src/libs/libgroff/change_lf.cpp
@@ -30,7 +30,8 @@ extern int current_lineno;
 
 void change_filename(const char *f)
 {
-  if (current_filename != 0 && strcmp(current_filename, f) == 0)
+  if ((current_filename != 0 /* nullptr */)
+      && (strcmp(current_filename, f) == 0))
     return;
   current_filename = strsave(f);
 }

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

Reply via email to