diff --git a/source/client/src/clientMain.c b/source/client/src/clientMain.c index a216b2afb2..2491f5d70a 100644 --- a/source/client/src/clientMain.c +++ b/source/client/src/clientMain.c @@ -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;