diff --git a/deps/lua/src/ldump.c b/deps/lua/src/ldump.c index f08277d3ac440a48a3f771113729f39f492e57cc..4b205914887a78da7f20d0725d00ba4c8841b206 100644 --- a/deps/lua/src/ldump.c +++ b/deps/lua/src/ldump.c @@ -60,7 +60,7 @@ static void DumpVector(const void* b, int n, size_t size, DumpState* D) static void DumpString(const TString* s, DumpState* D) { - if (s==NULL || getstr(s)==NULL) + if (s==NULL) { size_t size=0; DumpVar(size,D); diff --git a/src/kit/shell/src/shellEngine.c b/src/kit/shell/src/shellEngine.c index 83a8c42323766854a06dbf243b444dcd66b7b1b0..a9febf4c32bf9931a81b7b71bd65c79e27008931 100644 --- a/src/kit/shell/src/shellEngine.c +++ b/src/kit/shell/src/shellEngine.c @@ -1150,12 +1150,12 @@ int parse_cloud_dsn() { } } char *port = strstr(args.cloudHost, ":"); - if ((port == NULL) || (port + strlen(":")) == NULL) { + if (port == NULL) { fprintf(stderr, "Invalid format in TDengine cloud dsn: %s\n", args.cloudDsn); return -1; } char *token = strstr(port + strlen(":"), "?token="); - if ((token == NULL) || (token + strlen("?token=")) == NULL || + if ((token == NULL) || (strlen(token + strlen("?token=")) == 0)) { fprintf(stderr, "Invalid format in TDengine cloud dsn: %s\n", args.cloudDsn); return -1; @@ -1651,4 +1651,4 @@ void wsclient_query(char *command) { } else { printf("Query OK, %" PRId64 " row(s) in set (%.6fs)\n\n", total_rows, (et - st) / 1E6); } -} \ No newline at end of file +} diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 95931fcbc6f46bac1e535e4684750ab1874e8f0c..4f67c6088db5712c8ef3139bbe758b0c2d66c02b 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -361,8 +361,8 @@ void *rpcMallocCont(int contLen) { void rpcFreeCont(void *cont) { if (cont) { char *temp = ((char *)cont) - sizeof(SRpcHead) - sizeof(SRpcReqContext); - free(temp); tTrace("free mem: %p", temp); + free(temp); } } @@ -573,8 +573,8 @@ void rpcCancelRequest(int64_t rid) { static void rpcFreeMsg(void *msg) { if ( msg ) { char *temp = (char *)msg - sizeof(SRpcReqContext); - free(temp); tTrace("free mem: %p", temp); + free(temp); } } @@ -1683,4 +1683,4 @@ int32_t rpcUnusedSession(void * rpcInfo, bool bLock) { if(info == NULL) return 0; return taosIdPoolNumOfFree(info->idPool, bLock); -} \ No newline at end of file +} diff --git a/src/util/src/tqueue.c b/src/util/src/tqueue.c index 1ffa94b0df6b63dac914649c7003d37bbedbdb24..7b23b708b1ea9b480d8b7fecfb5e41bbdbafe9b7 100644 --- a/src/util/src/tqueue.c +++ b/src/util/src/tqueue.c @@ -86,9 +86,8 @@ void taosCloseQueue(taos_queue param) { } pthread_mutex_destroy(&queue->mutex); - free(queue); - uTrace("queue:%p is closed", queue); + free(queue); } void *taosAllocateQitem(int size) {