From 4572e3f44e037d6a5a167e799dc5bb56f588c5ac Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sun, 4 Dec 2022 13:50:15 +0200
Subject: [PATCH 35/35] CMA: Make SAVED_PARAMETER_SIZE big enough to hold
 max_growth

See osdn #46189

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/agents/cma_core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/client/agents/cma_core.c b/client/agents/cma_core.c
index 12494a29c3..41a004af62 100644
--- a/client/agents/cma_core.c
+++ b/client/agents/cma_core.c
@@ -79,7 +79,7 @@
 #define SHOW_APPLY_RESULT_ON_SERVER_ERRORS              FALSE
 #define ALWAYS_APPLY_AT_SERVER                          FALSE
 
-#define SAVED_PARAMETER_SIZE                            29
+#define SAVED_PARAMETER_SIZE                            30
 
 #define CMA_ATTR_VERSION                                3
 #define CMA_ATTR_VERSION_MIN_SUPPORTED                  2
@@ -557,7 +557,7 @@ bool cma_is_city_under_agent(const struct city *pcity,
     return FALSE;
   }
 
-  if (parameter) {
+  if (parameter != NULL) {
     memcpy(parameter, &my_parameter, sizeof(struct cm_parameter));
   }
 
@@ -567,7 +567,7 @@ bool cma_is_city_under_agent(const struct city *pcity,
 /************************************************************************//**
   Get the parameter.
 
-  Don't bother to cm_init_parameter, since we set all the fields anyway.
+  Don't bother to cm_init_parameter(), since we set all the fields anyway.
   But leave the comment here so we can find this place when searching
   for all the creators of a parameter.
 ****************************************************************************/
-- 
2.35.1