From: Paolo Bonzini <bonzini@gnu.org> Date: Fri, 2 Oct 2009 01:04:16 +0000 (+0200) Subject: link: LoadLibrary is not needed. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7b182c11bce2ba412f47a764dd7555a488dbfb1;p=pspp link: LoadLibrary is not needed. * lib/link.c: Use GetModuleHandle. --- diff --git a/ChangeLog b/ChangeLog index ecfb784ad6..0d14e354c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-10-01 Paolo Bonzini <bonzini@gnu.org> + + link: LoadLibrary is not needed. + * lib/link.c: Use GetModuleHandle. + 2009-10-01 Eric Blake <ebb9@byu.net> getopt: bump serial number diff --git a/lib/link.c b/lib/link.c index 42d086ce88..994ae4569c 100644 --- a/lib/link.c +++ b/lib/link.c @@ -41,7 +41,7 @@ static BOOL initialized = FALSE; static void initialize (void) { - HMODULE kernel32 = LoadLibrary ("kernel32.dll"); + HMODULE kernel32 = GetModuleHandle ("kernel32.dll"); if (kernel32 != NULL) { CreateHardLinkFunc =