elua: fork_win cleanup
authorDaniel Kolesa <quaker66@gmail.com>
Wed, 21 May 2014 09:38:46 +0000 (10:38 +0100)
committerDaniel Kolesa <d.kolesa@samsung.com>
Tue, 10 Jun 2014 14:48:51 +0000 (15:48 +0100)
src/bin/elua/fork_win.c

index cb79f19..6865374 100644 (file)
@@ -94,17 +94,19 @@ static int init_ntdll(void) {
     HMODULE ntdll = GetModuleHandle("ntdll");
     if (!ntdll) return 0;
 
-#define GETPROC(name) name = (name##_t)GetProcAddress(ntdll, #name)
-
-    GETPROC(ZwCreateProcess);
-    GETPROC(ZwQuerySystemInformation);
-    GETPROC(ZwQueryVirtualMemory);
-    GETPROC(ZwCreateThread);
-    GETPROC(ZwGetContextThread);
-    GETPROC(ZwResumeThread);
-    GETPROC(ZwQueryInformationThread);
-    GETPROC(ZwWriteVirtualMemory);
-    GETPROC(ZwClose);
+#define FORK_WIN_GETPROC(name) name = (name##_t)GetProcAddress(ntdll, #name)
+
+    FORK_WIN_GETPROC(ZwCreateProcess);
+    FORK_WIN_GETPROC(ZwQuerySystemInformation);
+    FORK_WIN_GETPROC(ZwQueryVirtualMemory);
+    FORK_WIN_GETPROC(ZwCreateThread);
+    FORK_WIN_GETPROC(ZwGetContextThread);
+    FORK_WIN_GETPROC(ZwResumeThread);
+    FORK_WIN_GETPROC(ZwQueryInformationThread);
+    FORK_WIN_GETPROC(ZwWriteVirtualMemory);
+    FORK_WIN_GETPROC(ZwClose);
+
+#undef FORK_WIN_GETPROC
 
     return !!ZwCreateProcess;
 }