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/IcqOscarJ/src/chan_04close.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'protocols/IcqOscarJ/src/chan_04close.cpp') diff --git a/protocols/IcqOscarJ/src/chan_04close.cpp b/protocols/IcqOscarJ/src/chan_04close.cpp index d02e20817b..7e1f6b2ffa 100644 --- a/protocols/IcqOscarJ/src/chan_04close.cpp +++ b/protocols/IcqOscarJ/src/chan_04close.cpp @@ -27,7 +27,7 @@ void CIcqProto::handleCloseChannel(BYTE *buf, size_t datalen, serverthread_info *info) { - oscar_tlv_chain *chain = NULL; + oscar_tlv_chain *chain = nullptr; // Parse server reply, prepare reconnection if (!info->bLoggedIn && datalen && !info->isNewServerReady) @@ -68,7 +68,7 @@ void CIcqProto::handleCloseChannel(BYTE *buf, size_t datalen, serverthread_info void CIcqProto::handleLoginReply(BYTE *buf, size_t datalen, serverthread_info *info) { - oscar_tlv_chain *chain = NULL; + oscar_tlv_chain *chain = nullptr; icq_sendCloseConnection(); // imitate icq5 behaviour @@ -136,9 +136,9 @@ int CIcqProto::connectNewServer(serverthread_info *info) debugLogA("Closed connection to login server"); - hServerConn = NetLib_OpenConnection(m_hNetlibUser, NULL, &nloc); + hServerConn = NetLib_OpenConnection(m_hNetlibUser, nullptr, &nloc); if (hServerConn && info->newServerSSL) /* Start SSL session if requested */ - if (!Netlib_StartSsl(hServerConn, NULL)) + if (!Netlib_StartSsl(hServerConn, nullptr)) NetLib_CloseConnection(&hServerConn, FALSE); if (hServerConn) { @@ -189,7 +189,7 @@ void CIcqProto::handleSignonError(WORD wError) case 0x05: // Mismatch uin or password case 0x06: // Internal Client error (bad input to authorizer) case 0x07: // Invalid account - ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPASSWORD); + ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, LOGINERR_WRONGPASSWORD); memset(m_szPassword, 0, sizeof(m_szPassword)); icq_LogFatalParam(LPGEN("Connection failed.\nYour ICQ number or password was rejected (%d)."), wError); break; @@ -201,7 +201,7 @@ void CIcqProto::handleSignonError(WORD wError) case 0x14: // Reservation map error case 0x15: // Reservation link error case 0x1A: // Reservation timeout - ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_NOSERVER); + ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, LOGINERR_NOSERVER); icq_LogFatalParam(LPGEN("Connection failed.\nThe server is temporarily unavailable (%d)."), wError); break; @@ -212,12 +212,12 @@ void CIcqProto::handleSignonError(WORD wError) case 0x18: // Reservation rate limit exceeded case 0x1D: // Rate limit exceeded - ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_NOSERVER); + ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, LOGINERR_NOSERVER); icq_LogFatalParam(LPGEN("Connection failed.\nYou have connected too quickly,\nplease wait and retry 10 to 20 minutes later (%d)."), wError); break; case 0x1B: // You are using an older version of ICQ. Upgrade required - ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_WRONGPROTOCOL); + ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, LOGINERR_WRONGPROTOCOL); icq_LogMessage(LOG_FATAL, LPGEN("Connection failed.\nThe server did not accept this client version.")); break; @@ -268,7 +268,7 @@ void CIcqProto::handleRuntimeError(WORD wError) { switch (wError) { case 0x01: - ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, NULL, LOGINERR_OTHERLOCATION); + ProtoBroadcastAck(NULL, ACKTYPE_LOGIN, ACKRESULT_FAILED, nullptr, LOGINERR_OTHERLOCATION); icq_LogMessage(LOG_FATAL, LPGEN("You have been disconnected from the ICQ network because you logged on from another location using the same ICQ number.")); break; -- cgit v1.2.3