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
96584d85
Commit
96584d85
authored
Nov 30, 2017
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 30, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Don't report error in fclose on already closed stream.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1899eadf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
file.c
dlls/msvcrt/file.c
+6
-0
file.c
dlls/msvcrt/tests/file.c
+3
-0
No files found.
dlls/msvcrt/file.c
View file @
96584d85
...
...
@@ -3627,6 +3627,12 @@ int CDECL MSVCRT__fclose_nolock(MSVCRT_FILE* file)
{
int
r
,
flag
;
if
(
!
(
file
->
_flag
&
(
MSVCRT__IOREAD
|
MSVCRT__IOWRT
|
MSVCRT__IORW
)))
{
file
->
_flag
=
0
;
return
MSVCRT_EOF
;
}
flag
=
file
->
_flag
;
MSVCRT_free
(
file
->
_tmpfname
);
file
->
_tmpfname
=
NULL
;
...
...
dlls/msvcrt/tests/file.c
View file @
96584d85
...
...
@@ -1742,10 +1742,13 @@ static void test_fopen_fclose_fcloseall( void )
ok
(
ret
==
0
,
"The file '%s' was not closed
\n
"
,
fname2
);
ret
=
fclose
(
stream3
);
ok
(
ret
==
0
,
"The file '%s' was not closed
\n
"
,
fname3
);
errno
=
0xdeadbeef
;
ret
=
fclose
(
stream2
);
ok
(
ret
==
EOF
,
"Closing file '%s' returned %d
\n
"
,
fname2
,
ret
);
ok
(
errno
==
0xdeadbeef
,
"errno = %d
\n
"
,
errno
);
ret
=
fclose
(
stream3
);
ok
(
ret
==
EOF
,
"Closing file '%s' returned %d
\n
"
,
fname3
,
ret
);
ok
(
errno
==
0xdeadbeef
,
"errno = %d
\n
"
,
errno
);
/* testing fcloseall() */
numclosed
=
_fcloseall
();
...
...
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