From 5177a76b9af3391a430ad431d606c76087223b49 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Mon, 16 Dec 2024 17:46:33 +0800 Subject: [PATCH] fix:[TD-32642] process return code --- source/client/src/clientMain.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index f576c44b09..2f2ccb12fe 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -109,8 +109,10 @@ static timezone_t setConnnectionTz(const char* val){ time_t tx1 = taosGetTimestampSec(); char output[TD_TIMEZONE_LEN] = {0}; - taosFormatTimezoneStr(tx1, val, tz, output); - code = taosHashPut(pTimezoneNameMap, &tz, sizeof(timezone_t), output, strlen(output) + 1); + code = taosFormatTimezoneStr(tx1, val, tz, output); + if (code == 0){ + code = taosHashPut(pTimezoneNameMap, &tz, sizeof(timezone_t), output, strlen(output) + 1); + } if (code != 0){ tscError("failed to put timezone %s to map", val); }