summaryrefslogtreecommitdiff
path: root/src/modules/plugins/dll_sniffer.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-21 20:04:48 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-21 20:04:48 +0000
commitd154673f93ad95197bce8cadb995daa5bc39f5d8 (patch)
tree191522aa88f9f845a9c27b1ddb86116b87033c4b /src/modules/plugins/dll_sniffer.cpp
parentbe50a70bfd8b3f3daf0c3351fdce6e2fea515bd7 (diff)
minor code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@7820 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/plugins/dll_sniffer.cpp')
-rw-r--r--src/modules/plugins/dll_sniffer.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/modules/plugins/dll_sniffer.cpp b/src/modules/plugins/dll_sniffer.cpp
index b3345a39c8..7e16df10aa 100644
--- a/src/modules/plugins/dll_sniffer.cpp
+++ b/src/modules/plugins/dll_sniffer.cpp
@@ -48,11 +48,11 @@ MUUID* GetPluginInterfaces(const TCHAR* ptszFileName, bool& bIsPlugin)
__try {
__try {
- if ( !hMap )
+ if (!hMap )
__leave;
DWORD dwHSize = 0, filesize = GetFileSize( hFile, &dwHSize );
- if ( !filesize || filesize == INVALID_FILE_SIZE || dwHSize)
+ if (!filesize || filesize == INVALID_FILE_SIZE || dwHSize)
__leave;
if ( filesize < sizeof(IMAGE_DOS_HEADER) + sizeof(IMAGE_NT_HEADERS) )
@@ -75,7 +75,7 @@ MUUID* GetPluginInterfaces(const TCHAR* ptszFileName, bool& bIsPlugin)
__leave;
int nSections = pINTH->FileHeader.NumberOfSections;
- if ( !nSections )
+ if (!nSections )
__leave;
INT_PTR base;
@@ -103,7 +103,7 @@ MUUID* GetPluginInterfaces(const TCHAR* ptszFileName, bool& bIsPlugin)
BYTE* pImage = ptr + pIDH->e_lfanew + pINTH->FileHeader.SizeOfOptionalHeader + sizeof(IMAGE_NT_HEADERS) - sizeof(IMAGE_OPTIONAL_HEADER);
IMAGE_SECTION_HEADER *pExp = getSectionByRVA((IMAGE_SECTION_HEADER *)pImage, nSections, pIDD);
- if ( !pExp) __leave;
+ if (!pExp) __leave;
BYTE *pSecStart = ptr + pExp->PointerToRawData - pExp->VirtualAddress;
IMAGE_EXPORT_DIRECTORY *pED = (PIMAGE_EXPORT_DIRECTORY)&pSecStart[expvaddr];
@@ -115,18 +115,18 @@ MUUID* GetPluginInterfaces(const TCHAR* ptszFileName, bool& bIsPlugin)
bool bHasLoad = false, bHasUnload = false, bHasInfo = false, bHasMuuids = false;
for (size_t i=0; i < pED->NumberOfNames; i++, ptrRVA++, ptrOrdRVA++) {
char *szName = (char*)&pSecStart[*ptrRVA];
- if ( !lstrcmpA(szName, "Load"))
+ if (!lstrcmpA(szName, "Load"))
bHasLoad = true;
- if ( !lstrcmpA(szName, "MirandaPluginInfoEx"))
+ if (!lstrcmpA(szName, "MirandaPluginInfoEx"))
bHasInfo = true;
- else if ( !lstrcmpA(szName, "Unload"))
+ else if (!lstrcmpA(szName, "Unload"))
bHasUnload = true;
- else if ( !lstrcmpA(szName, "MirandaInterfaces")) {
+ else if (!lstrcmpA(szName, "MirandaInterfaces")) {
bHasMuuids = true;
pIds = (MUUID*)&pSecStart[ ptrFuncList[*ptrOrdRVA]];
}
// old plugin, skip it
- else if ( !lstrcmpA(szName, "MirandaPluginInterfaces"))
+ else if (!lstrcmpA(szName, "MirandaPluginInterfaces"))
__leave;
}