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/times.cc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'winsup/cygwin/times.cc') diff --git a/winsup/cygwin/times.cc b/winsup/cygwin/times.cc index a7dec6a9b..ed0680235 100644 --- a/winsup/cygwin/times.cc +++ b/winsup/cygwin/times.cc @@ -471,13 +471,11 @@ utimes (const char *path, struct timeval *tvp) the times of directories. */ /* Note: It's not documented in MSDN that FILE_WRITE_ATTRIBUTES is sufficient to change the timestamps... */ - HANDLE h = CreateFileA (win32.get_win32 (), - FILE_WRITE_ATTRIBUTES, - FILE_SHARE_READ | FILE_SHARE_WRITE, - &sec_none_nih, - OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, - 0); + HANDLE h = CreateFile (win32, FILE_WRITE_ATTRIBUTES, + FILE_SHARE_READ | FILE_SHARE_WRITE, + &sec_none_nih, OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL | FILE_FLAG_BACKUP_SEMANTICS, + 0); if (h == INVALID_HANDLE_VALUE) { -- cgit v1.2.3