Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/compat
diff options
context:
space:
mode:
authorSeija Kijin <doremylover123@gmail.com>2023-02-02 01:20:33 +0300
committerJunio C Hamano <gitster@pobox.com>2023-02-02 01:36:19 +0300
commit592bcab61b86dbbac6fd2366039b4837b306ed66 (patch)
treeb94c0df8a3cfa6573f0ec3aa4c0d04fa829a2497 /compat
parent844ede312b4e988881b6e27e352f469d8ab80b2a (diff)
compat/winansi: check for errors of CreateThread() correctly
The return value for failed thread creation is NULL, not INVALID_HANDLE_VALUE, unlike other Windows API functions. Signed-off-by: Seija Kijin <doremylover123@gmail.com> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'compat')
-rw-r--r--compat/winansi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/compat/winansi.c b/compat/winansi.c
index 3abe8dd5a2..f83610f684 100644
--- a/compat/winansi.c
+++ b/compat/winansi.c
@@ -644,7 +644,7 @@ void winansi_init(void)
/* start console spool thread on the pipe's read end */
hthread = CreateThread(NULL, 0, console_thread, NULL, 0, NULL);
- if (hthread == INVALID_HANDLE_VALUE)
+ if (!hthread)
die_lasterr("CreateThread(console_thread) failed");
/* schedule cleanup routine */