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/IcqOscarJ/src/cookies.cpp | |
parent | 591ec17b1c99db7f120c22ca9fb20ae05fe78325 (diff) |
Code modernize ...
* replace 0/NULL with nullptr [using clang-tidy]
Diffstat (limited to 'protocols/IcqOscarJ/src/cookies.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/cookies.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/IcqOscarJ/src/cookies.cpp b/protocols/IcqOscarJ/src/cookies.cpp index 03f6be0954..df1305de8e 100644 --- a/protocols/IcqOscarJ/src/cookies.cpp +++ b/protocols/IcqOscarJ/src/cookies.cpp @@ -31,7 +31,7 @@ void CIcqProto::RemoveExpiredCookies()
{
- time_t tNow = time(NULL);
+ time_t tNow = time(nullptr);
for (int i = cookies.getCount() - 1; i >= 0; i--)
if ((cookies[i].dwTime + COOKIE_TIMEOUT) < tNow)
@@ -52,7 +52,7 @@ DWORD CIcqProto::AllocateCookie(BYTE bType, WORD wIdent, MCONTACT hContact, void p->dwCookie = dwThisSeq;
p->hContact = hContact;
p->pvExtra = pvExtra;
- p->dwTime = time(NULL);
+ p->dwTime = time(nullptr);
cookies.insert(p);
return dwThisSeq;
@@ -214,10 +214,10 @@ void CIcqProto::InitMessageCookie(cookie_message_data *pCookie) do {
// ensure that message ids are unique
- dwMsgID1 = time(NULL);
+ dwMsgID1 = time(nullptr);
dwMsgID2 = RandRange(0, 0x0FFFF);
}
- while (FindMessageCookie(dwMsgID1, dwMsgID2, NULL, NULL, NULL));
+ while (FindMessageCookie(dwMsgID1, dwMsgID2, nullptr, nullptr, nullptr));
if (pCookie) {
pCookie->dwMsgID1 = dwMsgID1;
|