inject-helper: Remove UNUSED_PARAMETER macro

Potential definition clash with c99defs.h. Not needed anyway.
master
jpark37 2021-11-20 22:11:02 -08:00 committed by Jim
parent e85c8f32fb
commit 2fa145899f
1 changed files with 9 additions and 10 deletions

View File

@ -92,12 +92,11 @@ static int inject_helper(wchar_t *argv[], const wchar_t *dll)
: inject_library_full(id, dll);
}
#define UNUSED_PARAMETER(x) ((void)(x))
int main(int argc, char *argv_ansi[])
int main(void)
{
wchar_t dll_path[MAX_PATH];
LPWSTR pCommandLineW;
int argc;
LPWSTR *argv;
int ret = INJECT_ERROR_INVALID_PARAMS;
@ -106,14 +105,14 @@ int main(int argc, char *argv_ansi[])
pCommandLineW = GetCommandLineW();
argv = CommandLineToArgvW(pCommandLineW, &argc);
if (argv && argc == 4) {
DWORD size = GetModuleFileNameW(NULL, dll_path, MAX_PATH);
if (size) {
ret = inject_helper(argv, argv[1]);
if (argv) {
if (argc == 4) {
if (GetModuleFileNameW(NULL, dll_path, MAX_PATH))
ret = inject_helper(argv, argv[1]);
}
}
LocalFree(argv);
UNUSED_PARAMETER(argv_ansi);
LocalFree(argv);
}
return ret;
}