From 9431641ff1c9343aa543019d7bd6c8c486404210 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 25 Sep 2020 07:05:49 +0000 Subject: [PATCH] minor changes --- src/rpc/src/rpcMain.c | 6 +++--- src/rpc/src/rpcTcp.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index cb318d5c24..50b1507a56 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -323,14 +323,14 @@ void *rpcMallocCont(int contLen) { tError("failed to malloc msg, size:%d", size); return NULL; } else { - tDebug("malloc mem: %p", start); + tDebug("malloc msg: %p", start); } return start + sizeof(SRpcReqContext) + sizeof(SRpcHead); } void rpcFreeCont(void *cont) { - if ( cont ) { + if (cont) { char *temp = ((char *)cont) - sizeof(SRpcHead) - sizeof(SRpcReqContext); free(temp); tDebug("free mem: %p", temp); @@ -553,7 +553,7 @@ static void rpcFreeMsg(void *msg) { if ( msg ) { char *temp = (char *)msg - sizeof(SRpcReqContext); free(temp); - tDebug("free mem: %p", temp); + tDebug("free msg: %p", temp); } } diff --git a/src/rpc/src/rpcTcp.c b/src/rpc/src/rpcTcp.c index 56b3fa8616..2a3facdb36 100644 --- a/src/rpc/src/rpcTcp.c +++ b/src/rpc/src/rpcTcp.c @@ -421,7 +421,7 @@ static int taosReadTcpData(SFdObj *pFdObj, SRecvInfo *pInfo) { msgLen = (int32_t)htonl((uint32_t)rpcHead.msgLen); buffer = malloc(msgLen + tsRpcOverhead); - if ( NULL == buffer) { + if (NULL == buffer) { tError("%s %p TCP malloc(size:%d) fail", pThreadObj->label, pFdObj->thandle, msgLen); return -1; } else { -- GitLab