gbranden pushed a commit to branch master
in repository groff.

commit fd09bbffa20212622daf33a1330b054c018395a7
Author: G. Branden Robinson <[email protected]>
AuthorDate: Sun May 31 21:18:24 2026 -0500

    [grohtml]: Fix code style nit. (2/2)
    
    * src/devices/grohtml/output.cpp (word::word)
      (word_list::word_list)
      (word_list::add_list): Do it.  Use idiomatic C++98 null pointer
      literal instead of C's `NULL`.
---
 ChangeLog                      |  9 +++++++++
 src/devices/grohtml/output.cpp | 14 +++++++-------
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 245180ecb..12129ea7e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2026-05-31  G. Branden Robinson <[email protected]>
+
+       [grohtml]: Fix code style nit.
+
+       * src/devices/grohtml/output.cpp (word::word)
+       (word_list::word_list)
+       (word_list::add_list): Do it.  Use idiomatic C++98 null pointer
+       literal instead of C's `NULL`.
+
 2026-05-31  G. Branden Robinson <[email protected]>
 
        [grohtml]: Be more fastidious with heap-allocated memory.
diff --git a/src/devices/grohtml/output.cpp b/src/devices/grohtml/output.cpp
index 8b9fdaa14..61709668a 100644
--- a/src/devices/grohtml/output.cpp
+++ b/src/devices/grohtml/output.cpp
@@ -60,11 +60,11 @@ along with this program.  If not, see 
<http://www.gnu.org/licenses/>. */
 
 
 /*
- *  word - initialise a word and set next to NULL
+ *  word - initialise a word and set next to a null pointer
  */
 
 word::word (const char *w, int n)
-  : next(0)
+  : next(0 /* nullptr */)
 {
   s = new char[n+1];
   strncpy(s, w, n);
@@ -85,7 +85,7 @@ word::~word ()
  */
 
 word_list::word_list ()
-  : length(0), head(0), tail(0)
+  : length(0), head(0 /* nullptr */), tail(0 /* nullptr */)
 {
 }
 
@@ -99,14 +99,14 @@ int word_list::flush (FILE *f)
   word *t;
   int   len=length;
 
-  while (head != 0) {
+  while (head != 0 /* nullptr */) {
     t = head;
     head = head->next;
     FPUTS(t->s, f);
     delete t;
   }
-  head   = 0;
-  tail   = 0;
+  head   = 0 /* nullptr */;
+  tail   = 0 /* nullptr */;
   length = 0;
 #if defined(DEBUGGING)
   fflush(f);   // just for testing
@@ -120,7 +120,7 @@ int word_list::flush (FILE *f)
 
 void word_list::add_word (const char *s, int n)
 {
-  if (head == 0) {
+  if (head == 0 /* nullptr */) {
     head = new word(s, n);
     tail = head;
   } else {

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

Reply via email to