diff options
author | Goraf <22941576+Goraf@users.noreply.github.com> | 2018-02-24 15:32:06 +0100 |
---|---|---|
committer | Goraf <22941576+Goraf@users.noreply.github.com> | 2018-02-24 18:20:46 +0100 |
commit | 1c0172cca4f1e90679321912e20436a7f42f122d (patch) | |
tree | 77a544d2c09332ec176f42ebcf58a40d9c5d2b93 /protocols/MRA/src/Sdk | |
parent | dff565f40105b20b0e8e4dba1f48ccc9b8e7ff44 (diff) |
more nullptr
Diffstat (limited to 'protocols/MRA/src/Sdk')
-rw-r--r-- | protocols/MRA/src/Sdk/ListMT.h | 22 | ||||
-rw-r--r-- | protocols/MRA/src/Sdk/MemoryFind.h | 2 | ||||
-rw-r--r-- | protocols/MRA/src/Sdk/MemoryFindByte.h | 2 |
3 files changed, 13 insertions, 13 deletions
diff --git a/protocols/MRA/src/Sdk/ListMT.h b/protocols/MRA/src/Sdk/ListMT.h index 4c3f6dd5b2..ed9b8cfec9 100644 --- a/protocols/MRA/src/Sdk/ListMT.h +++ b/protocols/MRA/src/Sdk/ListMT.h @@ -76,7 +76,7 @@ typedef CONST PLIST_MT_ITERATOR PCLIST_MT_ITERATOR, LPCLIST_MT_ITERATOR; __inline size_t ListMTGetCount(PCLIST_MT pclmtListMT)
{
- return((size_t)InterlockedCompareExchangePointer((LPVOID*)&pclmtListMT->nCount,NULL,NULL));
+ return((size_t)InterlockedCompareExchangePointer((LPVOID*)&pclmtListMT->nCount, nullptr, nullptr));
}
@@ -89,12 +89,12 @@ __inline size_t ListMTItemAdd(PCLIST_MT pclmtListMT,PCLIST_MT_ITEM pclmtListMTIt if (pclmtListMT->plmtiLast)
{// add node to end of list
pclmtListMTItem->plmtiPrev=pclmtListMT->plmtiLast;
- pclmtListMTItem->plmtiNext=NULL;
+ pclmtListMTItem->plmtiNext= nullptr;
pclmtListMT->plmtiLast->plmtiNext=pclmtListMTItem;
pclmtListMT->plmtiLast=pclmtListMTItem;
}else{// add the first node to the linked list
- pclmtListMTItem->plmtiPrev=NULL;
- pclmtListMTItem->plmtiNext=NULL;
+ pclmtListMTItem->plmtiPrev= nullptr;
+ pclmtListMTItem->plmtiNext= nullptr;
pclmtListMT->plmtiFirst=pclmtListMTItem;
pclmtListMT->plmtiLast=pclmtListMTItem;
}
@@ -113,16 +113,16 @@ __inline DWORD ListMTItemDelete(PCLIST_MT pclmtListMT,PCLIST_MT_ITEM pclmtListMT if (plmtiPrevNode || plmtiNextNode)
{
- if (plmtiPrevNode && plmtiNextNode==NULL)
+ if (plmtiPrevNode && plmtiNextNode == nullptr)
{// This is the start node in the list to delete
// отключился последний подключившийся
- plmtiPrevNode->plmtiNext=NULL;
+ plmtiPrevNode->plmtiNext = nullptr;
pclmtListMT->plmtiLast=plmtiPrevNode;
}else{
- if (plmtiPrevNode==NULL && plmtiNextNode)
+ if (plmtiPrevNode == nullptr && plmtiNextNode)
{// This is the end node in the list to delete
// отключился первый подключившийся
- plmtiNextNode->plmtiPrev=NULL;
+ plmtiNextNode->plmtiPrev = nullptr;
pclmtListMT->plmtiFirst=plmtiNextNode;
}else{// оключился клиент не первый и не последний
//if (plmtiPrev && plmtiNext)
@@ -133,11 +133,11 @@ __inline DWORD ListMTItemDelete(PCLIST_MT pclmtListMT,PCLIST_MT_ITEM pclmtListMT }
}
}else{// This is the only node in the list to delete
- pclmtListMT->plmtiFirst=NULL;
- pclmtListMT->plmtiLast=NULL;
+ pclmtListMT->plmtiFirst = nullptr;
+ pclmtListMT->plmtiLast = nullptr;
}
- pclmtListMTItem->lpListMT=NULL;
+ pclmtListMTItem->lpListMT = nullptr;
InterlockedDecrementPointer(&pclmtListMT->nCount);// pclmtListMT->nCount--;
dwRetErrorCode=NO_ERROR;
}else{// попытались удалить элемент не относящийся к данному списку
diff --git a/protocols/MRA/src/Sdk/MemoryFind.h b/protocols/MRA/src/Sdk/MemoryFind.h index 75072540bd..f41ea64b6d 100644 --- a/protocols/MRA/src/Sdk/MemoryFind.h +++ b/protocols/MRA/src/Sdk/MemoryFind.h @@ -34,7 +34,7 @@ __inline void *MemoryFind(size_t dwFrom,const void *pBuff,size_t dwBuffSize,const void *pWhatFind,size_t dwWhatFindSize)
{
- void *pRet=NULL;
+ void *pRet = nullptr;
if (pBuff && dwBuffSize && pWhatFind && dwWhatFindSize && (dwFrom+dwWhatFindSize)<=dwBuffSize)
{
diff --git a/protocols/MRA/src/Sdk/MemoryFindByte.h b/protocols/MRA/src/Sdk/MemoryFindByte.h index 27a3b96149..146fd74b30 100644 --- a/protocols/MRA/src/Sdk/MemoryFindByte.h +++ b/protocols/MRA/src/Sdk/MemoryFindByte.h @@ -34,7 +34,7 @@ __inline void *MemoryFindByte(size_t dwFrom,const void *pBuff,size_t dwBuffSize,unsigned char chWhatFind)
{
- void *pRet=NULL;
+ void *pRet = nullptr;
if (pBuff && dwBuffSize && dwFrom<dwBuffSize)
{
|