diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c index efe0f8907..3fac96192 100644 --- a/crypto/rand/rand_win.c +++ b/crypto/rand/rand_win.c @@ -463,7 +463,7 @@ int RAND_poll(void) PROCESSENTRY32 p; THREADENTRY32 t; MODULEENTRY32 m; - DWORD stoptime = 0; + DWORD starttime = 0; snap = (CREATETOOLHELP32SNAPSHOT) GetProcAddress(kernel, "CreateToolhelp32Snapshot"); @@ -496,7 +496,7 @@ int RAND_poll(void) */ ZeroMemory(&hlist, sizeof(HEAPLIST32)); hlist.dwSize = sizeof(HEAPLIST32); - if (good) stoptime = GetTickCount() + MAXDELAY; + if (good) starttime = GetTickCount(); #ifdef _MSC_VER if (heaplist_first(handle, &hlist)) { @@ -536,7 +536,7 @@ int RAND_poll(void) ex_cnt_limit--; } } while (heaplist_next(handle, &hlist) - && GetTickCount() < stoptime + && (GetTickCount()-starttime) 0); } @@ -559,7 +559,7 @@ int RAND_poll(void) && --entrycnt > 0); } } while (heaplist_next(handle, &hlist) - && GetTickCount() < stoptime); + && (GetTickCount()-starttime)