s/-1/HFILE_ERROR/ in _lread

Francois Gouget fgouget at free.fr
Fri Jan 16 06:33:47 CST 2004


Of course HFILE_ERROR==-1 so this is a nop but I guess one day I had to
give a closer look to _lread and noticed that the doc says it's supposed
to return HFILE_ERROR in case of error. So now I might as well submit
it.


Changelog:

 * dlls/kernel/file.c

   s/-1/HFILE_ERROR/ in _lread


Index: dlls/kernel/file.c
===================================================================
RCS file: /home/cvs/wine/dlls/kernel/file.c,v
retrieving revision 1.6
diff -u -r1.6 file.c
--- dlls/kernel/file.c	14 Jan 2004 04:34:22 -0000	1.6
+++ dlls/kernel/file.c	14 Jan 2004 12:27:02 -0000
@@ -258,7 +258,8 @@
 UINT WINAPI _lread( HFILE handle, LPVOID buffer, UINT count )
 {
     DWORD result;
-    if (!ReadFile( (HANDLE)handle, buffer, count, &result, NULL )) return -1;
+    if (!ReadFile( (HANDLE)handle, buffer, count, &result, NULL ))
+        return HFILE_ERROR;
     return result;
 }



-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
          tcA thgirypoC muinelliM latigiD eht detaloiv tsuj evah uoY



More information about the wine-patches mailing list