From a7c24ca48995cf2bf436156302f96b91bf135409 Mon Sep 17 00:00:00 2001 From: Goraf <22941576+Goraf@users.noreply.github.com> Date: Mon, 13 Nov 2017 15:03:31 +0100 Subject: Code modernize ... * replace 0/NULL with nullptr [using clang-tidy] --- protocols/Tlen/src/tlen_ws.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'protocols/Tlen/src/tlen_ws.cpp') diff --git a/protocols/Tlen/src/tlen_ws.cpp b/protocols/Tlen/src/tlen_ws.cpp index 3da3a54c88..1cf07644d8 100644 --- a/protocols/Tlen/src/tlen_ws.cpp +++ b/protocols/Tlen/src/tlen_ws.cpp @@ -44,15 +44,15 @@ BOOL TlenWsInit(TlenProtocol *proto) nlus.useProxy = 0; Netlib_SetUserSettings(proto->hFileNetlibUser, &nlus); - return (proto->m_hNetlibUser != NULL)?TRUE:FALSE; + return (proto->m_hNetlibUser != nullptr)?TRUE:FALSE; } void TlenWsUninit(TlenProtocol *proto) { - if (proto->m_hNetlibUser != NULL) Netlib_CloseHandle(proto->m_hNetlibUser); - if (proto->hFileNetlibUser != NULL) Netlib_CloseHandle(proto->hFileNetlibUser); - proto->m_hNetlibUser = NULL; - proto->hFileNetlibUser = NULL; + if (proto->m_hNetlibUser != nullptr) Netlib_CloseHandle(proto->m_hNetlibUser); + if (proto->hFileNetlibUser != nullptr) Netlib_CloseHandle(proto->hFileNetlibUser); + proto->m_hNetlibUser = nullptr; + proto->hFileNetlibUser = nullptr; } HNETLIBCONN TlenWsConnect(TlenProtocol *proto, char *host, WORD port) @@ -97,7 +97,7 @@ int TlenWsSendAES(TlenProtocol *proto, char *data, int datalen, aes_context *aes int len, sendlen; unsigned char aes_input[16]; unsigned char aes_output[256]; - if (proto->threadData == NULL) { + if (proto->threadData == nullptr) { return FALSE; } while (datalen > 0) { @@ -127,7 +127,7 @@ int TlenWsRecvAES(TlenProtocol *proto, char *data, long datalen, aes_context *ae int ret, len = 0, maxlen = datalen; unsigned char aes_input[16]; unsigned char *aes_output = (unsigned char *)data; - if (proto->threadData == NULL) { + if (proto->threadData == nullptr) { return 0; } for (maxlen = maxlen & ~0xF; maxlen != 0; maxlen = maxlen & 0xF) { -- cgit v1.2.3