From 95c97a5df812fa9c81ca35550b2ce8d2dffb4905 Mon Sep 17 00:00:00 2001 From: Haojun Liao Date: Fri, 22 May 2020 22:46:11 +0800 Subject: [PATCH] [td-225]refactor code: remove useless codes --- src/client/src/tscLocal.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/client/src/tscLocal.c b/src/client/src/tscLocal.c index 79fa1e28cc..5ffdcd2167 100644 --- a/src/client/src/tscLocal.c +++ b/src/client/src/tscLocal.c @@ -384,13 +384,10 @@ int tscProcessLocalCmd(SSqlObj *pSql) { // keep the code in local variable in order to avoid invalid read in case of async query int32_t code = pSql->res.code; - - if (pSql->fp != NULL) { // callback function - if (code == 0) { - (*pSql->fp)(pSql->param, pSql, 0); - } else { - tscQueueAsyncRes(pSql); - } + if (code == TSDB_CODE_SUCCESS) { + (*pSql->fp)(pSql->param, pSql, 0); + } else { + tscQueueAsyncRes(pSql); } return code; -- GitLab