chore: more code

This commit is contained in:
kailixu 2023-05-18 13:30:45 +08:00
parent ab06dd04f4
commit 0e891c5c14
1 changed files with 2 additions and 2 deletions

View File

@ -1053,8 +1053,8 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) {
return -1;
}
int32_t vlen = strlen(cfgReq.value);
if ((idx == 10 && vlen != (TSDB_ACTIVE_KEY_LEN - 1)) ||
(idx == 11 && (vlen > (TSDB_CONN_ACTIVE_KEY_LEN -1) || vlen < (TSDB_ACTIVE_KEY_LEN - 1)))) {
if (vlen > 0 && ((idx == 10 && vlen != (TSDB_ACTIVE_KEY_LEN - 1)) ||
(idx == 11 && (vlen > (TSDB_CONN_ACTIVE_KEY_LEN - 1) || vlen < (TSDB_ACTIVE_KEY_LEN - 1))))) {
mError("dnode:%d, failed to config activeCode since invalid vlen. conf:%s, val:%s", cfgReq.dnodeId, cfgReq.config,
cfgReq.value);
terrno = TSDB_CODE_INVALID_OPTION;