From c26072867d0ed82f6c7c592ad7fa8c0a5c1638f2 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Thu, 8 Jan 2026 02:44:04 +0200
Subject: [PATCH 61/61] version.[ch]: Replace NULL with nullptr

See RM #1887

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 common/version.c | 20 ++++++++++----------
 common/version.h |  8 ++++----
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/common/version.c b/common/version.c
index 1e1ffbd1f2..b584a5bd9c 100644
--- a/common/version.c
+++ b/common/version.c
@@ -70,7 +70,7 @@ const char *word_version(void)
 
 /*******************************************************************//**
   Returns string with git revision information if it is possible to
-  determine. Can return also some fallback string or even NULL.
+  determine. Can return also some fallback string or even nullptr.
 ***********************************************************************/
 const char *fc_git_revision(void)
 {
@@ -83,7 +83,7 @@ const char *fc_git_revision(void)
 
   return buf; /* Either revision, or modified revision */
 #else  /* FC_GITREV_OFF */
-  return NULL;
+  return nullptr;
 #endif /* FC_GITREV_OFF */
 }
 
@@ -99,7 +99,7 @@ const char *fc_comparable_version(void)
 
 /*******************************************************************//**
   Return the BETA message.
-  If returns NULL, not a beta version.
+  If returns nullptr, not a beta version.
 ***********************************************************************/
 const char *beta_message(void)
 {
@@ -107,7 +107,7 @@ const char *beta_message(void)
   static char msgbuf[500];
   static const char *month[] =
   {
-    NULL,
+    nullptr,
     N_("January"),
     N_("February"),
     N_("March"),
@@ -136,26 +136,26 @@ const char *beta_message(void)
   }
   return msgbuf;
 #else  /* IS_BETA_VERSION */
-  return NULL;
+  return nullptr;
 #endif /* IS_BETA_VERSION */
 }
 
 /*******************************************************************//**
   Return the alpha message.
-  If returns NULL, not an alpha version.
+  If returns nullptr, not an alpha version.
 ***********************************************************************/
 const char *alpha_message(void)
 {
 #if IS_DEVEL_VERSION
   return _("THIS IS A DEVELOPMENT VERSION");
 #else  /* IS_DEVEL_VERSION */
-  return NULL;
+  return nullptr;
 #endif /* IS_DEVEL_VERSION */
 }
 
 /*******************************************************************//**
   Return the alpha or beta message.
-  If returns NULL, not such a version.
+  If returns nullptr, not such a version.
 ***********************************************************************/
 const char *unstable_message(void)
 {
@@ -164,7 +164,7 @@ const char *unstable_message(void)
 #elif IS_BETA_VERSION
   return beta_message();
 #else
-  return NULL;
+  return nullptr;
 #endif
 }
 
@@ -191,7 +191,7 @@ const char *freeciv_datafile_version(void)
     const char *ver_rev;
 
     ver_rev = fc_git_revision();
-    if (ver_rev != NULL) {
+    if (ver_rev != nullptr) {
       fc_snprintf(buf, sizeof(buf), "%s (%s)", VERSION_STRING, ver_rev);
     } else {
       fc_snprintf(buf, sizeof(buf), "%s", VERSION_STRING);
diff --git a/common/version.h b/common/version.h
index e204b8fe40..5fe65fd969 100644
--- a/common/version.h
+++ b/common/version.h
@@ -25,10 +25,10 @@ extern "C" {
  * The month[] array is defined in version.c (index: 1 == Jan, 2 == Feb, ...).
  */
 #ifndef NEXT_RELEASE_MONTH
-#define NEXT_RELEASE_MONTH	(month[FREECIV_RELEASE_MONTH])
+#define NEXT_RELEASE_MONTH      (month[FREECIV_RELEASE_MONTH])
 #endif
 
-/* version informational strings */
+/* Version informational strings */
 const char *freeciv_name_version(void);
 const char *word_version(void);
 const char *fc_git_revision(void);
@@ -37,7 +37,7 @@ const char *freeciv_datafile_version(void);
 
 const char *freeciv_motto(void);
 
-/* If returns NULL, not a beta version. */
+/* If returns nullptr, not a beta version. */
 const char *beta_message(void);
 const char *alpha_message(void);
 const char *unstable_message(void);
@@ -46,4 +46,4 @@ const char *unstable_message(void);
 }
 #endif /* __cplusplus */
 
-#endif  /* FC__VERSION_H */
+#endif /* FC__VERSION_H */
-- 
2.51.0

