gbranden pushed a commit to branch master
in repository groff.
commit ee6d91dc84e56646ed8e4857945a6b4811d87836
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sat Mar 28 19:06:15 2026 -0500
src/roff/troff/input.cpp: Fix code style nit.
* src/roff/troff/input.cpp (in_output_page_list, main): Explicitly
compare values of pointer type to null pointer literals instead of
letting them pun down to Booleans.
---
ChangeLog | 6 ++++++
src/roff/troff/input.cpp | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 531c155b9..84d8a5929 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2026-03-28 G. Branden Robinson <[email protected]>
+
+ * src/roff/troff/input.cpp (in_output_page_list, main):
+ Explicitly compare values of pointer type to null pointer
+ literals instead of letting them pun down to Booleans.
+
2022-02-05 Dave Kemper <[email protected]>
* doc/groff.texi.in (Assigning Register Formats): Clarify
diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp
index 3fda7283d..b4caa4888 100644
--- a/src/roff/troff/input.cpp
+++ b/src/roff/troff/input.cpp
@@ -9635,7 +9635,7 @@ page_range *output_page_list = 0 /* nullptr */;
bool in_output_page_list(int n)
{
- if (!output_page_list)
+ if (0 /* nullptr */ == output_page_list)
return true;
for (page_range *p = output_page_list;
p != 0 /* nullptr */;
@@ -10118,7 +10118,7 @@ int main(int argc, char **argv)
font_size::init_size_list(font::sizes);
int i;
int j = 1;
- if (font::style_table)
+ if (font::style_table != 0 /* nullptr */)
for (i = 0; font::style_table[i] != 0 /* nullptr */; i++)
// Mounting a style can't actually fail due to a bad style name;
// that's not determined until the full font name is resolved.
_______________________________________________
groff-commit mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/groff-commit