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] --- plugins/SecureIM/src/svcs_rsa.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/SecureIM/src/svcs_rsa.cpp') diff --git a/plugins/SecureIM/src/svcs_rsa.cpp b/plugins/SecureIM/src/svcs_rsa.cpp index e60c19430a..66dbfe4686 100644 --- a/plugins/SecureIM/src/svcs_rsa.cpp +++ b/plugins/SecureIM/src/svcs_rsa.cpp @@ -1,6 +1,6 @@ #include "commonheaders.h" -pRSA_EXPORT mir_exp = NULL; +pRSA_EXPORT mir_exp = nullptr; RSA_IMPORT imp = { rsa_inject, @@ -36,7 +36,7 @@ int __cdecl rsa_check_pub(HANDLE context, PBYTE pub, int pubLen, PBYTE sig, int LPSTR uin = (LPSTR)mir_alloc(KEYSIZE); getContactUinA(ptr->hContact, uin); LPSTR msg = (LPSTR)mir_alloc(MSGSIZE); LPSTR sha = mir_strdup(to_hex(sig, sigLen)); - LPSTR sha_old = NULL; + LPSTR sha_old = nullptr; Sent_NetLog("rsa_check_pub: %s %s %s", cnm, uin, sha); @@ -62,7 +62,7 @@ int __cdecl rsa_check_pub(HANDLE context, PBYTE pub, int pubLen, PBYTE sig, int else { if (k) mir_snprintf(msg, MSGSIZE, Translate(sim522), cnm, sha, sha_old); else mir_snprintf(msg, MSGSIZE, Translate(sim520), cnm, sha); - v = (msgbox(0, msg, MODULENAME, MB_YESNO | MB_ICONQUESTION) == IDYES); + v = (msgbox(nullptr, msg, MODULENAME, MB_YESNO | MB_ICONQUESTION) == IDYES); #if defined(_DEBUG) || defined(NETLIB_LOG) Sent_NetLog("rsa_check_pub: manual accepted %d", v); #endif @@ -82,7 +82,7 @@ int __cdecl rsa_check_pub(HANDLE context, PBYTE pub, int pubLen, PBYTE sig, int void __cdecl rsa_notify(HANDLE context, int state) { pUinKey ptr = getUinCtx(context); if (!ptr) return; - LPCSTR msg = NULL; + LPCSTR msg = nullptr; Sent_NetLog("rsa_notify: 0x%x", state); @@ -194,6 +194,6 @@ void resetRSAcntx(pUinKey ptr) void deleteRSAcntx(pUinKey ptr) { cpp_delete_context(ptr->cntx); - ptr->cntx = 0; + ptr->cntx = nullptr; ptr->keyLoaded = 0; } -- cgit v1.2.3