From 8c7505cee753c6139698e0027fef9a3af711f20b Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 25 Feb 2022 10:19:45 +0800 Subject: [PATCH] minor changes --- source/os/src/osEnv.c | 34 +++++++++++++++++----------------- source/os/src/osSysinfo.c | 5 ----- 2 files changed, 17 insertions(+), 22 deletions(-) diff --git a/source/os/src/osEnv.c b/source/os/src/osEnv.c index 6e8d0e5704..4c368fe895 100644 --- a/source/os/src/osEnv.c +++ b/source/os/src/osEnv.c @@ -19,23 +19,23 @@ extern void taosWinSocketInit(); char configDir[PATH_MAX] = {0}; -char tsDataDir[PATH_MAX]; -char tsLogDir[PATH_MAX]; -char tsTempDir[PATH_MAX]; -SDiskSpace tsDataSpace; -SDiskSpace tsLogSpace; -SDiskSpace tsTempSpace; -char tsOsName[16]; -char tsTimezone[TD_TIMEZONE_LEN]; -char tsLocale[TD_LOCALE_LEN]; -char tsCharset[TD_CHARSET_LEN]; -int8_t tsDaylight; -bool tsEnableCoreFile; -int64_t tsPageSize; -int64_t tsOpenMax; -int64_t tsStreamMax; -int32_t tsNumOfCores; -int32_t tsTotalMemoryMB; +char tsDataDir[PATH_MAX] = {0}; +char tsLogDir[PATH_MAX] = {0}; +char tsTempDir[PATH_MAX] = {0}; +SDiskSpace tsDataSpace = {0}; +SDiskSpace tsLogSpace = {0}; +SDiskSpace tsTempSpace = {0}; +char tsOsName[16] = {0}; +char tsTimezone[TD_TIMEZONE_LEN] = {0}; +char tsLocale[TD_LOCALE_LEN] = {0}; +char tsCharset[TD_CHARSET_LEN] = {0}; +int8_t tsDaylight = 0; +bool tsEnableCoreFile = 0; +int64_t tsPageSize = 0; +int64_t tsOpenMax = 0; +int64_t tsStreamMax = 0; +int32_t tsNumOfCores = 0; +int32_t tsTotalMemoryMB = 0; void osInit() { srand(taosSafeRand()); diff --git a/source/os/src/osSysinfo.c b/source/os/src/osSysinfo.c index 0fecee4942..45749588c1 100644 --- a/source/os/src/osSysinfo.c +++ b/source/os/src/osSysinfo.c @@ -16,11 +16,6 @@ #define _DEFAULT_SOURCE #include "os.h" -int32_t tsTotalMemoryMB = 0; -int64_t tsPageSize = 0; -int64_t tsOpenMax = 0; -int64_t tsStreamMax = 0; -int32_t tsNumOfCores = 2; #if defined(_TD_WINDOWS_64) || defined(_TD_WINDOWS_32) /*