File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,7 @@ FinalizeSections(PMEMORYMODULE module)
257257#ifdef _WIN64
258258 uintptr_t imageOffset = (module -> headers -> OptionalHeader .ImageBase & 0xffffffff00000000 );
259259#else
260- #define imageOffset 0
260+ static const uintptr_t imageOffset = 0 ;
261261#endif
262262 SECTIONFINALIZEDATA sectionData ;
263263 sectionData .address = (LPVOID )((uintptr_t )section -> Misc .PhysicalAddress | imageOffset );
@@ -298,9 +298,6 @@ FinalizeSections(PMEMORYMODULE module)
298298 if (!FinalizeSection (module , & sectionData )) {
299299 return FALSE;
300300 }
301- #ifndef _WIN64
302- #undef imageOffset
303- #endif
304301 return TRUE;
305302}
306303
@@ -838,7 +835,7 @@ static PIMAGE_RESOURCE_DIRECTORY_ENTRY _MemorySearchResourceEntry(
838835#else
839836 // Resource names are always stored using 16bit characters, need to
840837 // convert string we search for.
841- #define MAX_LOCAL_KEY_LENGTH 2048
838+ static const size_t MAX_LOCAL_KEY_LENGTH = 2048 ;
842839 // In most cases resource names are short, so optimize for that by
843840 // using a pre-allocated array.
844841 wchar_t _searchKeySpace [MAX_LOCAL_KEY_LENGTH + 1 ];
@@ -887,7 +884,6 @@ static PIMAGE_RESOURCE_DIRECTORY_ENTRY _MemorySearchResourceEntry(
887884 if (searchKeyLen > MAX_LOCAL_KEY_LENGTH ) {
888885 free (_searchKey );
889886 }
890- #undef MAX_LOCAL_KEY_LENGTH
891887#endif
892888 }
893889
You can’t perform that action at this time.
0 commit comments