From 580e99a151bdeea4141a0bf03f1e57f07d288ee7 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 19 Sep 2002 15:12:48 +0000 Subject: Cleanup calls to CreateFile throughout. * dcrt0.cc (__api_fatal): Correctly check for failing return from CreateFile. * assert.cc (__assert): Don't check return value from CreateFile for NULL. * fhandler_console.cc (set_console_state_for_spawn): Ditto. * fork.cc (fork_parent): Ditto. --- winsup/cygwin/assert.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'winsup/cygwin/assert.cc') diff --git a/winsup/cygwin/assert.cc b/winsup/cygwin/assert.cc index fbce8753e..063c7b852 100644 --- a/winsup/cygwin/assert.cc +++ b/winsup/cygwin/assert.cc @@ -28,9 +28,9 @@ __assert (const char *file, int line, const char *failedexpr) /* If we don't have a console in a Windows program, then bring up a message box for the assertion failure. */ - h = CreateFileA ("CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE, &sec_none_nih, - OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - if (h == INVALID_HANDLE_VALUE || h == 0) + h = CreateFile ("CONOUT$", GENERIC_WRITE, FILE_SHARE_WRITE, &sec_none_nih, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (h == INVALID_HANDLE_VALUE) { char *buf; -- cgit v1.2.3