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)
257
257
#ifdef _WIN64
258
258
uintptr_t imageOffset = (module -> headers -> OptionalHeader .ImageBase & 0xffffffff00000000 );
259
259
#else
260
- #define imageOffset 0
260
+ static const uintptr_t imageOffset = 0 ;
261
261
#endif
262
262
SECTIONFINALIZEDATA sectionData ;
263
263
sectionData .address = (LPVOID )((uintptr_t )section -> Misc .PhysicalAddress | imageOffset );
@@ -298,9 +298,6 @@ FinalizeSections(PMEMORYMODULE module)
298
298
if (!FinalizeSection (module , & sectionData )) {
299
299
return FALSE;
300
300
}
301
- #ifndef _WIN64
302
- #undef imageOffset
303
- #endif
304
301
return TRUE;
305
302
}
306
303
@@ -838,7 +835,7 @@ static PIMAGE_RESOURCE_DIRECTORY_ENTRY _MemorySearchResourceEntry(
838
835
#else
839
836
// Resource names are always stored using 16bit characters, need to
840
837
// convert string we search for.
841
- #define MAX_LOCAL_KEY_LENGTH 2048
838
+ static const size_t MAX_LOCAL_KEY_LENGTH = 2048 ;
842
839
// In most cases resource names are short, so optimize for that by
843
840
// using a pre-allocated array.
844
841
wchar_t _searchKeySpace [MAX_LOCAL_KEY_LENGTH + 1 ];
@@ -887,7 +884,6 @@ static PIMAGE_RESOURCE_DIRECTORY_ENTRY _MemorySearchResourceEntry(
887
884
if (searchKeyLen > MAX_LOCAL_KEY_LENGTH ) {
888
885
free (_searchKey );
889
886
}
890
- #undef MAX_LOCAL_KEY_LENGTH
891
887
#endif
892
888
}
893
889
You can’t perform that action at this time.
0 commit comments