aboutsummaryrefslogtreecommitdiffstats
path: root/win32/win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 7c802aba6b..5774d0c503 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -3965,21 +3965,21 @@ rb_w32_getppid(void)
HANDLE hNtDll = GetModuleHandle("ntdll.dll");
if (hNtDll) {
pNtQueryInformationProcess = (long (WINAPI *)(HANDLE, int, void *, ULONG, ULONG *))GetProcAddress(hNtDll, "NtQueryInformationProcess");
- if (pNtQueryInformationProcess) {
- struct {
- long ExitStatus;
- void* PebBaseAddress;
- ULONG AffinityMask;
- ULONG BasePriority;
- ULONG UniqueProcessId;
- ULONG ParentProcessId;
- } pbi;
- ULONG len;
- long ret = pNtQueryInformationProcess(GetCurrentProcess(), 0, &pbi, sizeof(pbi), &len);
- if (!ret) {
- ppid = pbi.ParentProcessId;
- }
- }
+ }
+ }
+ if (pNtQueryInformationProcess) {
+ struct {
+ long ExitStatus;
+ void* PebBaseAddress;
+ ULONG AffinityMask;
+ ULONG BasePriority;
+ ULONG UniqueProcessId;
+ ULONG ParentProcessId;
+ } pbi;
+ ULONG len;
+ long ret = pNtQueryInformationProcess(GetCurrentProcess(), 0, &pbi, sizeof(pbi), &len);
+ if (!ret) {
+ ppid = pbi.ParentProcessId;
}
}
}