enh: code optimization

This commit is contained in:
kailixu 2024-04-16 09:04:33 +08:00
parent a6fe9a861f
commit 8ea9c8b879
1 changed files with 4 additions and 3 deletions

View File

@ -237,7 +237,7 @@ int32_t dmProcessCreateEncryptKeyReq(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) {
if (code == 0) {
tsEncryptionKeyChksum = taosCalcChecksum(0, cfgReq.value, strlen(cfgReq.value));
tsEncryptionKeyStat = ENCRYPT_KEY_STAT_LOADED;
strncpy(tsEncryptKey, cfgReq.value, ENCRYPT_KEY_LEN + 1);
tstrncpy(tsEncryptKey, cfgReq.value, ENCRYPT_KEY_LEN + 1);
}
pMsg->code = code;
@ -245,8 +245,9 @@ int32_t dmProcessCreateEncryptKeyReq(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) {
pMsg->info.rspLen = 0;
_exit:
return code;
#endif
#else
return 0;
#endif
}
static void dmGetServerRunStatus(SDnodeMgmt *pMgmt, SServerStatusRsp *pStatus) {