From 561baa37bced47e334082d2f62d20ef504060c44 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 25 Nov 2022 21:29:29 +0800 Subject: [PATCH] fix TD-20751 mem leak --- source/os/src/osSocket.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/os/src/osSocket.c b/source/os/src/osSocket.c index a4264a7e88..679fd8a8b6 100644 --- a/source/os/src/osSocket.c +++ b/source/os/src/osSocket.c @@ -1107,10 +1107,10 @@ void taosWinSocketInit() { uint64_t taosHton64(uint64_t val) { #if defined(WINDOWS) || defined(DARWIN) - ((val & 0x00000000000000ff) << 7 * 8) | ((val & 0x000000000000ff00) << 5 * 8) | - ((val & 0x0000000000ff0000) << 3 * 8) | ((val & 0x00000000ff000000) << 1 * 8) | - ((val & 0x000000ff00000000) >> 1 * 8) | ((val & 0x0000ff0000000000) >> 3 * 8) | - ((val & 0x00ff000000000000) >> 5 * 8) | ((val & 0xff00000000000000) >> 7 * 8) + return ((val & 0x00000000000000ff) << 7 * 8) | ((val & 0x000000000000ff00) << 5 * 8) | + ((val & 0x0000000000ff0000) << 3 * 8) | ((val & 0x00000000ff000000) << 1 * 8) | + ((val & 0x000000ff00000000) >> 1 * 8) | ((val & 0x0000ff0000000000) >> 3 * 8) | + ((val & 0x00ff000000000000) >> 5 * 8) | ((val & 0xff00000000000000) >> 7 * 8); #else if (__BYTE_ORDER == __LITTLE_ENDIAN) { return (((uint64_t)htonl((int)((val << 32) >> 32))) << 32) | (unsigned int)htonl((int)(val >> 32)); -- GitLab