aboutsummaryrefslogtreecommitdiff
path: root/ares/ares_library_init.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-05-18 01:25:20 +0000
committerYang Tse <yangsita@gmail.com>2009-05-18 01:25:20 +0000
commita450efb48357bff39fcb214d4d5115ee2d3b8d9d (patch)
tree9176d109e0ad3747057c7def648d341015fc8385 /ares/ares_library_init.c
parent0cf8d4f8e8d847af1fb3756ecfac13423215d59e (diff)
Intentionally avoid checking if the address of SystemFunction036, a.k.a.
RtlGenRandom, has been located or not. This function is only available on WinXP and later. When unavailable c-ares uses portable rand() function.
Diffstat (limited to 'ares/ares_library_init.c')
-rw-r--r--ares/ares_library_init.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ares/ares_library_init.c b/ares/ares_library_init.c
index 92bcedf2d..ee3fe68b6 100644
--- a/ares/ares_library_init.c
+++ b/ares/ares_library_init.c
@@ -51,12 +51,12 @@ static int ares_win32_init(void)
fpSystemFunction036 = (fpSystemFunction036_t)
GetProcAddress(hnd_advapi32, "SystemFunction036");
- if (!fpSystemFunction036)
- {
- FreeLibrary(hnd_advapi32);
- FreeLibrary(hnd_iphlpapi);
- return ARES_EADDRSYSTEMFUNCTION036;
- }
+
+ /*
+ * Intentionally avoid checking if the address of SystemFunction036, a.k.a.
+ * RtlGenRandom, has been located or not. This function is only available on
+ * WinXP and later. When unavailable c-ares uses portable rand() function.
+ */
#endif
return ARES_SUCCESS;