From 7d1e2f1f9de92a8e4a52882615390b8421b3ba5f Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Thu, 25 Apr 2024 16:38:26 +0800 Subject: [PATCH] fix(util): set code to be success if set config success. --- source/util/src/tconfig.c | 3 +-- tests/army/community/cmdline/fullopt.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/source/util/src/tconfig.c b/source/util/src/tconfig.c index 5ca2be37f2..b1d9403a9d 100644 --- a/source/util/src/tconfig.c +++ b/source/util/src/tconfig.c @@ -361,12 +361,11 @@ int32_t cfgSetItem(SConfig *pCfg, const char *name, const char *value, ECfgSrcTy } case CFG_DTYPE_NONE: default: + terrno = TSDB_CODE_INVALID_CFG; break; } taosThreadMutexUnlock(&pCfg->lock); - - terrno = TSDB_CODE_INVALID_CFG; return code; } diff --git a/tests/army/community/cmdline/fullopt.py b/tests/army/community/cmdline/fullopt.py index c03ba428a1..e61501d7b8 100644 --- a/tests/army/community/cmdline/fullopt.py +++ b/tests/army/community/cmdline/fullopt.py @@ -49,7 +49,7 @@ class TDTestCase(TBase): def checkQueryOK(self, rets): if rets[-2][:9] != "Query OK,": - tdLog.exit(f"check taos -s return unecpect: {rets}") + tdLog.exit(f"check taos -s return unexpect: {rets}") def doTaos(self): tdLog.info(f"check taos command options...")