提交 539337ca 编写于 作者: K kailixu

chore: code optimization

上级 f6078dc2
...@@ -121,14 +121,13 @@ TAOS *taos_connect(const char *ip, const char *user, const char *pass, const cha ...@@ -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) { int taos_set_notify_cb(TAOS *taos, __taos_notify_fn_t *fp, void *param) {
if (taos == NULL) { if (taos == NULL) {
return 0; return TSDB_CODE_INVALID_PARA;
} }
STscObj *pObj = acquireTscObj(*(int64_t *)taos); STscObj *pObj = acquireTscObj(*(int64_t *)taos);
if (NULL == pObj) { if (NULL == pObj) {
tscError("invalid parameter for %s", __func__); tscError("invalid parameter for %s", __func__);
terrno = TSDB_CODE_TSC_DISCONNECTED; return TSDB_CODE_TSC_DISCONNECTED;
return -1;
} }
int32_t type = param ? *(int32_t *)param : 0; int32_t type = param ? *(int32_t *)param : 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册