diff --git a/src/driver/common/common.h b/src/driver/common/common.h index 56751376..7755d1db 100644 --- a/src/driver/common/common.h +++ b/src/driver/common/common.h @@ -47,7 +47,7 @@ #if defined(FORT_DRIVER) # define LOG(...) DbgPrintEx(DPFLTR_SYSTEM_ID, DPFLTR_ERROR_LEVEL, "FORT: " __VA_ARGS__) #else -# define LOG(...) (__VA_ARGS__) +# define LOG(...) #endif #ifndef NT_SUCCESS diff --git a/src/driver/fortps.c b/src/driver/fortps.c index c49ac5d2..3dc12bf5 100644 --- a/src/driver/fortps.c +++ b/src/driver/fortps.c @@ -149,7 +149,6 @@ static void NTAPI fort_pstree_notify( UNUSED(process); const DWORD pid = (DWORD) (ptrdiff_t) processId; - const DWORD ppid = (DWORD) (ptrdiff_t) createInfo->ParentProcessId; if (createInfo == NULL) { #ifdef FORT_DEBUG @@ -161,6 +160,8 @@ static void NTAPI fort_pstree_notify( if (createInfo->ImageFileName == NULL || createInfo->CommandLine == NULL) return; + const DWORD ppid = (DWORD) (ptrdiff_t) createInfo->ParentProcessId; + #ifdef FORT_DEBUG LOG("PsTree: pid=%d ppid=%d IMG=[%wZ] CMD=[%wZ]\n", pid, ppid, createInfo->ImageFileName, createInfo->CommandLine);