[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Bump minimal supported Windows version to Windows 8 (0x0602). (#499)

Nicolas Cellier notifications at github.com
Wed May 13 20:03:07 UTC 2020


@nicolas-cellier-aka-nice commented on this pull request.



> -		LPVOID                    lpFileInformation,
-		DWORD                     dwBufferSize
-		);
-	static pfnGetFileInformationByHandleEx pGetFileInformationByHandleEx = NULL;
-	if (!pGetFileInformationByHandleEx) {
-		pGetFileInformationByHandleEx = (pfnGetFileInformationByHandleEx)
-			GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetFileInformationByHandleEx");
-		if (!pGetFileInformationByHandleEx)
-			return -1;
-	}
-
-	nameinfo = malloc(size);
-	if (nameinfo == NULL) {
-		return -1;
-	}
+	nameinfo = alloca(size);

Why not, alloca is a bit shorter, but the pairs of malloc and free seems correct here...
I'd rather consider this change as un-necessary.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/499#pullrequestreview-411257352
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20200513/421f83ba/attachment.html>


More information about the Vm-dev mailing list