diff --git a/src/rpc/src/rpcTcp.c b/src/rpc/src/rpcTcp.c index 5dd5e4015e6b01339da7756c863ace9fb9ec00d8..42940e80c12370a904f5bdf26aa0eed4ae9131d3 100644 --- a/src/rpc/src/rpcTcp.c +++ b/src/rpc/src/rpcTcp.c @@ -296,7 +296,7 @@ void *taosOpenTcpClientConnection(void *shandle, void *thandle, uint32_t ip, uin SThreadObj * pThreadObj = shandle; int fd = taosOpenTcpClientSocket(ip, port, pThreadObj->ip); - if (fd <= 0) return NULL; + if (fd < 0) return NULL; SFdObj *pFdObj = taosMallocFdObj(pThreadObj, fd); diff --git a/src/rpc/src/rpcUdp.c b/src/rpc/src/rpcUdp.c index 6f6014b678f6f3440b5193e74abc12710119b956..9723080cdadceda994e0e791e2077314afb434e7 100644 --- a/src/rpc/src/rpcUdp.c +++ b/src/rpc/src/rpcUdp.c @@ -192,7 +192,7 @@ static void *taosRecvUdpData(void *param) { char *tmsg = malloc(dataLen + tsRpcOverhead); if (NULL == tmsg) { - tError("%s failed to allocate memory, size:%d", pConn->label, dataLen); + tError("%s failed to allocate memory, size:%ld", pConn->label, dataLen); continue; } diff --git a/src/util/src/tqueue.c b/src/util/src/tqueue.c index 428c40ef7afe254a032856833c6d1f4b7cd3f515..4cf7eb31640be9c8b2cd8dc728402f6b62b18460 100644 --- a/src/util/src/tqueue.c +++ b/src/util/src/tqueue.c @@ -145,7 +145,7 @@ int taosReadQitem(taos_queue param, int *type, void **pitem) { queue->numOfItems--; if (queue->qset) atomic_sub_fetch_32(&queue->qset->numOfItems, 1); code = 1; - uTrace("item:%p is read out from queue:%p, type:%d items:%d", *pitem, *type, queue->numOfItems); + uTrace("item:%p is read out from queue:%p, type:%d items:%d", *pitem, queue, *type, queue->numOfItems); } pthread_mutex_unlock(&queue->mutex);