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 /plugins/YAMN/src/proto/pop3/pop3.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'plugins/YAMN/src/proto/pop3/pop3.cpp')
-rw-r--r-- | plugins/YAMN/src/proto/pop3/pop3.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/YAMN/src/proto/pop3/pop3.cpp b/plugins/YAMN/src/proto/pop3/pop3.cpp index 5204ba1259..d47fac4836 100644 --- a/plugins/YAMN/src/proto/pop3/pop3.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3.cpp @@ -34,11 +34,11 @@ //sets AckFlag char *CPop3Client::Connect(const char* servername,const int port,BOOL UseSSL, BOOL NoTLS) { - char *temp = 0; + char *temp = nullptr; if (Stopped) //check if we can work with this POP3 client session throw POP3Error=(DWORD)EPOP3_STOPPED; - if (NetClient != NULL) + if (NetClient != nullptr) delete NetClient; SSL=UseSSL; NetClient=new CNLClient; @@ -56,7 +56,7 @@ char *CPop3Client::Connect(const char* servername,const int port,BOOL UseSSL, BO catch (...) { NetClient->Disconnect(); - return NULL; + return nullptr; } } @@ -73,7 +73,7 @@ char *CPop3Client::Connect(const char* servername,const int port,BOOL UseSSL, BO NetClient->SSLify(); } catch (...) { NetClient->Disconnect(); - return NULL; + return nullptr; } // temp = RecvRest(NetClient->Recv(),POP3_SEARCHACK); } @@ -105,7 +105,7 @@ char* CPop3Client::RecvRest(char* prev,int mode,int size) { //if not found if (NetClient->Stopped) //check if we can work with this POP3 client session { - if (PrevString != NULL) + if (PrevString != nullptr) free(PrevString); throw POP3Error=(DWORD)EPOP3_STOPPED; } @@ -113,9 +113,9 @@ char* CPop3Client::RecvRest(char* prev,int mode,int size) { SizeRead+=size; SizeLeft=size; - LastString=NetClient->Recv(NULL,SizeLeft); + LastString=NetClient->Recv(nullptr,SizeLeft); PrevString=(char *)realloc(PrevString,sizeof(char)*(SizeRead+size)); - if (PrevString==NULL) + if (PrevString==nullptr) throw POP3Error=(DWORD)EPOP3_RESTALLOC; memcpy(PrevString+SizeRead,LastString,size); free(LastString); @@ -239,7 +239,7 @@ char* CPop3Client::APOP(char* name, char* pw, char* timestamp) char *Result; unsigned char digest[16]; - if (timestamp==NULL) + if (timestamp==nullptr) throw POP3Error=(DWORD)EPOP3_APOP; mir_md5_state_s ctx; mir_md5_init(&ctx); |