chore: code optimization

This commit is contained in:
kailixu 2023-04-10 16:12:54 +08:00
parent f6078dc27e
commit 539337ca0b
1 changed files with 2 additions and 3 deletions

View File

@ -121,14 +121,13 @@ TAOS *taos_connect(const char *ip, const char *user, const char *pass, const cha
int taos_set_notify_cb(TAOS *taos, __taos_notify_fn_t *fp, void *param) {
if (taos == NULL) {
return 0;
return TSDB_CODE_INVALID_PARA;
}
STscObj *pObj = acquireTscObj(*(int64_t *)taos);
if (NULL == pObj) {
tscError("invalid parameter for %s", __func__);
terrno = TSDB_CODE_TSC_DISCONNECTED;
return -1;
return TSDB_CODE_TSC_DISCONNECTED;
}
int32_t type = param ? *(int32_t *)param : 0;