Fix make error.

This commit is contained in:
xiao-77 2024-12-16 13:28:31 +08:00
parent 0bf2280223
commit 320c291576
1 changed files with 3 additions and 3 deletions

View File

@ -14,8 +14,8 @@
*/ */
#define _DEFAULT_SOURCE #define _DEFAULT_SOURCE
#include "tenv.h"
#include "tconfig.h" #include "tconfig.h"
#include "tenv.h"
static char toLowChar(char c) { return (c > 'Z' || c < 'A' ? c : (c - 'A' + 'a')); } static char toLowChar(char c) { return (c > 'Z' || c < 'A' ? c : (c - 'A' + 'a')); }
@ -50,12 +50,12 @@ int32_t taosEnvNameToCfgName(const char *envNameStr, char *cfgNameStr, int32_t c
return strlen(cfgNameStr); return strlen(cfgNameStr);
} }
int32_t taosEnvToCfg(const char *envStr, char *cfgStr,int32_t cfgStrLen) { int32_t taosEnvToCfg(const char *envStr, char *cfgStr, int32_t cfgStrLen) {
if (envStr == NULL || cfgStr == NULL) { if (envStr == NULL || cfgStr == NULL) {
return TSDB_CODE_INVALID_PARA; return TSDB_CODE_INVALID_PARA;
} }
if (cfgStr != envStr) { if (cfgStr != envStr) {
tstrncpy(cfgStr, envStr, strlen(envStr) + 1); tstrncpy(cfgStr, envStr, cfgStrLen);
} }
char *p = strchr(cfgStr, '='); char *p = strchr(cfgStr, '=');