diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:03:31 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2017-11-13 15:07:33 +0100 |
commit | a7c24ca48995cf2bf436156302f96b91bf135409 (patch) | |
tree | 953835509ff1b778833e78fd7b74b05e05e77c84 /protocols/Tlen/src/tlen_ws.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/Tlen/src/tlen_ws.cpp')
-rw-r--r-- | protocols/Tlen/src/tlen_ws.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
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) {
|