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
048a80ff
Commit
048a80ff
authored
Dec 05, 2016
by
Lauri Kenttä
Committed by
Alexandre Julliard
Dec 06, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Compare handles to INVALID_HANDLE_VALUE, not NULL.
Signed-off-by:
Lauri Kenttä
<
lauri.kentta@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f447b644
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
builtins.c
programs/cmd/builtins.c
+3
-3
No files found.
programs/cmd/builtins.c
View file @
048a80ff
...
...
@@ -444,7 +444,7 @@ static BOOL WCMD_AppendEOF(WCHAR *filename)
h
=
CreateFileW
(
filename
,
GENERIC_WRITE
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
h
==
NULL
)
{
if
(
h
==
INVALID_HANDLE_VALUE
)
{
WINE_ERR
(
"Failed to open %s (%d)
\n
"
,
wine_dbgstr_w
(
filename
),
GetLastError
());
return
FALSE
;
}
else
{
...
...
@@ -478,7 +478,7 @@ static BOOL WCMD_ManualCopy(WCHAR *srcname, WCHAR *dstname, BOOL ascii, BOOL app
in
=
CreateFileW
(
srcname
,
GENERIC_READ
,
0
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
in
==
NULL
)
{
if
(
in
==
INVALID_HANDLE_VALUE
)
{
WINE_ERR
(
"Failed to open %s (%d)
\n
"
,
wine_dbgstr_w
(
srcname
),
GetLastError
());
return
FALSE
;
}
...
...
@@ -486,7 +486,7 @@ static BOOL WCMD_ManualCopy(WCHAR *srcname, WCHAR *dstname, BOOL ascii, BOOL app
/* Open the output file, overwriting if not appending */
out
=
CreateFileW
(
dstname
,
GENERIC_WRITE
,
0
,
NULL
,
append
?
OPEN_EXISTING
:
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
out
==
NULL
)
{
if
(
out
==
INVALID_HANDLE_VALUE
)
{
WINE_ERR
(
"Failed to open %s (%d)
\n
"
,
wine_dbgstr_w
(
dstname
),
GetLastError
());
CloseHandle
(
in
);
return
FALSE
;
...
...
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