changeset 775:456235ae762e

s/SET_MAX_BUF/SET_CFG_MAX_PARSE_BUF/g
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 01 Jul 2023 22:48:03 +0300
parents 08bbfb5239fc
children 680324e43852
files th_config.c
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/th_config.c	Sat Jul 01 22:12:51 2023 +0300
+++ b/th_config.c	Sat Jul 01 22:48:03 2023 +0300
@@ -12,7 +12,7 @@
 #include <stdarg.h>
 
 
-#define SET_MAX_BUF     (8192)
+#define SET_CFG_MAX_PARSE_BUF     (8192)
 
 
 /* Deallocate a given configuration. Notice that the values are NOT freed,
@@ -220,7 +220,7 @@
 }
 
 
-#define VADDCH(ch) if (strPos < SET_MAX_BUF) { tmpStr[strPos++] = ch; }
+#define VADDCH(ch) if (strPos < SET_CFG_MAX_PARSE_BUF) { tmpStr[strPos++] = ch; }
 
 
 static bool th_cfg_is_end(const int ch)
@@ -335,7 +335,7 @@
     isEscaped = fpSet = isStart = false;
     strPos = 0;
 
-    if ((tmpStr = th_malloc(SET_MAX_BUF + 1)) == NULL)
+    if ((tmpStr = th_malloc(SET_CFG_MAX_PARSE_BUF + 1)) == NULL)
         goto out;
 
     // Parse the configuration
@@ -595,7 +595,7 @@
                     // Error! String too long!
                     ret = th_io_error(fh, THERR_INVALID_DATA,
                         "String too long! Maximum is %d characters.",
-                        SET_MAX_BUF);
+                        SET_CFG_MAX_PARSE_BUF);
                     goto out;
                 }
                 isEscaped = false;
@@ -673,7 +673,7 @@
                 // Error! String too long!
                 ret = th_io_error(fh, ret,
                     "String too long! Maximum is %d characters.",
-                    SET_MAX_BUF);
+                    SET_CFG_MAX_PARSE_BUF);
                 goto out;
             }