Merge pull request #29083 from taosdata/fix/internal

fix: compile errors
This commit is contained in:
Shengliang Guan 2024-12-10 17:32:14 +08:00 committed by GitHub
commit 2241336f57
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 8 deletions

View File

@ -87,8 +87,7 @@ int32_t taosSetSystemLocale(const char *inLocale) {
return terrno; return terrno;
} }
(void)memcpy(tsLocale, inLocale, strlen(inLocale) + 1); tstrncpy(tsLocale, locale, TD_LOCALE_LEN);
return 0; return 0;
} }

View File

@ -84,9 +84,8 @@ TEST(osEnvTests, osSufficient) {
ret = osTempSpaceSufficient(); ret = osTempSpaceSufficient();
EXPECT_EQ(ret, true); EXPECT_EQ(ret, true);
osSetSystemLocale(NULL, NULL); taosSetSystemLocale(NULL);
osSetSystemLocale(NULL, NULL); taosSetSystemLocale("1");
osSetSystemLocale("1", "2");
osSetProcPath(1, NULL); osSetProcPath(1, NULL);
osSetProcPath(0, (char **)&ret); osSetProcPath(0, (char **)&ret);