From 0372ad9f117d574cca0bbad9830d72057b18a34d Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 26 May 2003 15:43:54 +0000 Subject: [PATCH] * fhandler.cc (is_at_eof): Fix conditional. Use INVALID_FILE_SIZE instead of numeric constant. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/fhandler.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e7634c7cd..b61ba696d 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2003-05-26 Corinna Vinschen + + * fhandler.cc (is_at_eof): Fix conditional. Use INVALID_FILE_SIZE + instead of numeric constant. + 2003-05-26 Corinna Vinschen * fhandler_socket.cc (fhandler_socket::connect): Guard calls to diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 83302dd73..ebd1aa9f6 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -206,7 +206,7 @@ is_at_eof (HANDLE h, DWORD err) DWORD size, upper1, curr; size = GetFileSize (h, &upper1); - if (upper1 != 0xffffffff || GetLastError () == NO_ERROR) + if (size != INVALID_FILE_SIZE || GetLastError () == NO_ERROR) { LONG upper2 = 0; curr = SetFilePointer (h, 0, &upper2, FILE_CURRENT);