aboutsummaryrefslogtreecommitdiff
path: root/MemDriverLib
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2019-09-26 09:22:09 +0200
committerToni Uhlig <matzeton@googlemail.com>2019-09-26 09:22:09 +0200
commitd18ee31facdf341aa2e79a782e4701d46c57621c (patch)
tree2354d8a1adc7a5939bd6499290422096b83b3e18 /MemDriverLib
parent25bf52435cb7297531bfc3538a9c2c0f06b9f8aa (diff)
added explicit struct constructor
Diffstat (limited to 'MemDriverLib')
-rw-r--r--MemDriverLib/PatternScanner.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/MemDriverLib/PatternScanner.cpp b/MemDriverLib/PatternScanner.cpp
index 1b2a493..3e1b8ee 100644
--- a/MemDriverLib/PatternScanner.cpp
+++ b/MemDriverLib/PatternScanner.cpp
@@ -20,13 +20,8 @@ static bool map_file_kmem(MODULE_DATA& module, PVOID * const buffer,
static bool map_file_kmem_cleanup(MODULE_DATA& module, PVOID buffer,
PVOID const user_ptr);
-const struct map_file_data map_loadlib = {
- map_file_loadlib, map_file_loadlib_cleanup, true
-};
-
-const struct map_file_data map_kmem = {
- map_file_kmem, map_file_kmem_cleanup, false
-};
+const struct map_file_data map_loadlib = map_file_data(map_file_loadlib, map_file_loadlib_cleanup, true);
+const struct map_file_data map_kmem = map_file_data(map_file_kmem, map_file_kmem_cleanup, false);
bool map_file_loadlib(MODULE_DATA& module, PVOID * const buffer,
SIZE_T * const size, PVOID const user_ptr)
@@ -161,7 +156,7 @@ bool PatternScanner::Scan(MODULE_DATA& module, const char * const pattern)
return false;
}
- if (!mfd->map_file(module, (PVOID *)&mappedBuffer, &mappedSize, map_file_user_data))
+ if (!mfd->mapfile(module, (PVOID *)&mappedBuffer, &mappedSize, map_file_user_data))
{
return false;
}
@@ -190,7 +185,7 @@ bool PatternScanner::Scan(MODULE_DATA& module, const char * const pattern)
doScan(mappedBuffer, mappedSize, foundOffsets);
}
- if (!mfd->map_file_cleanup(module, mappedBuffer, map_file_user_data))
+ if (!mfd->mapcleanup(module, mappedBuffer, map_file_user_data))
{
return false;
}