Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1f83e7d9
Commit
1f83e7d9
authored
Jan 08, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Use _lclose instead of CloseHandle to avoid handle casts.
parent
2136b169
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
file.c
dlls/kernel32/tests/file.c
+9
-9
No files found.
dlls/kernel32/tests/file.c
View file @
1f83e7d9
...
...
@@ -364,7 +364,7 @@ static void test__llseek( void )
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
(
_llseek
(
filehandle
,
-
400
*
strlen
(
sillytext
),
FILE_END
)
!=
-
1
,
"should be able to seek
\n
"
);
ok
(
_llseek
(
filehandle
,
-
400
*
(
LONG
)
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
"
);
...
...
@@ -1845,8 +1845,8 @@ static void test_OpenFile(void)
ok
(
ofs
.
cBytes
==
sizeof
(
OFSTRUCT
),
"OpenFile set ofs.cBytes to %d
\n
"
,
ofs
.
cBytes
);
ok
(
ofs
.
nErrCode
==
ERROR_SUCCESS
||
broken
(
ofs
.
nErrCode
!=
ERROR_SUCCESS
)
/* win9x */
,
"OpenFile set ofs.nErrCode to %d
\n
"
,
ofs
.
nErrCode
);
ret
=
CloseHandle
((
HANDLE
)
hFile
);
ok
(
ret
==
TRUE
,
"CloseHandl
e() returns %d
\n
"
,
ret
);
ret
=
_lclose
(
hFile
);
ok
(
!
ret
,
"_lclos
e() returns %d
\n
"
,
ret
);
retval
=
GetFileAttributesA
(
filename
);
ok
(
retval
!=
INVALID_FILE_ATTRIBUTES
,
"GetFileAttributesA: error %d
\n
"
,
GetLastError
()
);
...
...
@@ -1863,8 +1863,8 @@ static void test_OpenFile(void)
"OpenFile set ofs.nErrCode to %d
\n
"
,
ofs
.
nErrCode
);
ok
(
lstrcmpiA
(
ofs
.
szPathName
,
buff
)
==
0
,
"OpenFile returned '%s', but was expected to return '%s'
\n
"
,
ofs
.
szPathName
,
buff
);
ret
=
CloseHandle
((
HANDLE
)
hFile
);
ok
(
ret
==
TRUE
,
"CloseHandl
e() returns %d
\n
"
,
ret
);
ret
=
_lclose
(
hFile
);
ok
(
!
ret
,
"_lclos
e() returns %d
\n
"
,
ret
);
memset
(
&
ofs
,
0xA5
,
sizeof
(
ofs
));
SetLastError
(
0xfaceabee
);
...
...
@@ -1878,8 +1878,8 @@ static void test_OpenFile(void)
"OpenFile set ofs.nErrCode to %d
\n
"
,
ofs
.
nErrCode
);
ok
(
lstrcmpiA
(
ofs
.
szPathName
,
buff
)
==
0
,
"OpenFile returned '%s', but was expected to return '%s'
\n
"
,
ofs
.
szPathName
,
buff
);
ret
=
CloseHandle
((
HANDLE
)
hFile
);
ok
(
ret
==
TRUE
,
"CloseHandl
e() returns %d
\n
"
,
ret
);
ret
=
_lclose
(
hFile
);
ok
(
!
ret
,
"_lclos
e() returns %d
\n
"
,
ret
);
memset
(
&
ofs
,
0xA5
,
sizeof
(
ofs
));
SetLastError
(
0xfaceabee
);
...
...
@@ -1893,8 +1893,8 @@ static void test_OpenFile(void)
"OpenFile set ofs.nErrCode to %d
\n
"
,
ofs
.
nErrCode
);
ok
(
lstrcmpiA
(
ofs
.
szPathName
,
buff
)
==
0
,
"OpenFile returned '%s', but was expected to return '%s'
\n
"
,
ofs
.
szPathName
,
buff
);
ret
=
CloseHandle
((
HANDLE
)
hFile
);
ok
(
ret
==
TRUE
,
"CloseHandl
e() returns %d
\n
"
,
ret
);
ret
=
_lclose
(
hFile
);
ok
(
!
ret
,
"_lclos
e() returns %d
\n
"
,
ret
);
memset
(
&
ofs
,
0xA5
,
sizeof
(
ofs
));
SetLastError
(
0xfaceabee
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment