From 52f99aeacbec46ce175152078d8be695cf1f8837 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Sat, 3 Jan 2009 20:21:01 +0100 Subject: [PATCH] kernel32/tests: Don't compare the result of llseek or hwrite against HFILE_ERROR. --- dlls/kernel32/tests/file.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c index e8e5c8fac02..b4a0b98164a 100644 --- a/dlls/kernel32/tests/file.c +++ b/dlls/kernel32/tests/file.c @@ -356,20 +356,20 @@ static void test__llseek( void ) for (i = 0; i < 400; i++) { - ok( HFILE_ERROR != _hwrite( filehandle, sillytext, strlen( sillytext ) ), "_hwrite complains\n" ); + ok( _hwrite( filehandle, sillytext, strlen( sillytext ) ) != -1, "_hwrite complains\n" ); } - ok( HFILE_ERROR != _llseek( filehandle, 400 * strlen( sillytext ), FILE_CURRENT ), "should be able to seek\n" ); - ok( HFILE_ERROR != _llseek( filehandle, 27 + 35 * strlen( sillytext ), FILE_BEGIN ), "should be able to seek\n" ); + ok( _llseek( filehandle, 400 * strlen( sillytext ), FILE_CURRENT ) != -1, "should be able to seek\n" ); + ok( _llseek( filehandle, 27 + 35 * strlen( sillytext ), FILE_BEGIN ) != -1, "should be able to seek\n" ); bytes_read = _hread( filehandle, buffer, 1); ok( 1 == bytes_read, "file read size error\n" ); ok( buffer[0] == sillytext[27], "_llseek error, it got lost seeking\n" ); - ok( HFILE_ERROR != _llseek( filehandle, -400 * strlen( sillytext ), FILE_END ), "should be able to seek\n" ); + ok( _llseek( filehandle, -400 * strlen( sillytext ), FILE_END ) != -1, "should be able to seek\n" ); bytes_read = _hread( filehandle, buffer, 1); ok( 1 == bytes_read, "file read size error\n" ); ok( buffer[0] == sillytext[0], "_llseek error, it got lost seeking\n" ); - ok( HFILE_ERROR != _llseek( filehandle, 1000000, FILE_END ), "should be able to seek past file; poor, poor Windows programmers\n" ); + ok( _llseek( filehandle, 1000000, FILE_END ) != -1, "should be able to seek past file; poor, poor Windows programmers\n" ); ok( HFILE_ERROR != _lclose(filehandle), "_lclose complains\n" ); ret = DeleteFileA( filename );