# HG changeset patch # User Matti Hamalainen # Date 1688240883 -10800 # Node ID 456235ae762e611b6a7cb1e86ac0fcf44cbf0186 # Parent 08bbfb5239fc21a400f36b5f92e55870c6471172 s/SET_MAX_BUF/SET_CFG_MAX_PARSE_BUF/g diff -r 08bbfb5239fc -r 456235ae762e th_config.c --- 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 -#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; }