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
961e88f7
Commit
961e88f7
authored
Nov 08, 2009
by
Marcus Meissner
Committed by
Alexandre Julliard
Nov 10, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mciavi32: Removed duplicate strlen/NULL check (Coverity).
parent
25bfe9df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
20 deletions
+17
-20
mciavi.c
dlls/mciavi32/mciavi.c
+17
-20
No files found.
dlls/mciavi32/mciavi.c
View file @
961e88f7
...
...
@@ -250,29 +250,26 @@ static DWORD MCIAVI_mciOpen(UINT wDevID, DWORD dwFlags,
* contains the hFile value ?
*/
dwRet
=
MCIERR_UNRECOGNIZED_COMMAND
;
}
else
if
(
strlenW
(
lpOpenParms
->
lpstrElementName
)
>
0
)
{
}
else
if
(
lpOpenParms
->
lpstrElementName
&&
lpOpenParms
->
lpstrElementName
[
0
]
)
{
/* FIXME : what should be done id wma->hFile is already != 0, or the driver is playin' */
TRACE
(
"MCI_OPEN_ELEMENT %s!
\n
"
,
debugstr_w
(
lpOpenParms
->
lpstrElementName
));
if
(
lpOpenParms
->
lpstrElementName
&&
(
strlenW
(
lpOpenParms
->
lpstrElementName
)
>
0
))
{
wma
->
lpFileName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
(
lpOpenParms
->
lpstrElementName
)
+
1
)
*
sizeof
(
WCHAR
));
strcpyW
(
wma
->
lpFileName
,
lpOpenParms
->
lpstrElementName
);
wma
->
hFile
=
mmioOpenW
(
lpOpenParms
->
lpstrElementName
,
NULL
,
MMIO_ALLOCBUF
|
MMIO_DENYWRITE
|
MMIO_READ
);
if
(
wma
->
hFile
==
0
)
{
WARN
(
"can't find file=%s!
\n
"
,
debugstr_w
(
lpOpenParms
->
lpstrElementName
));
dwRet
=
MCIERR_FILE_NOT_FOUND
;
}
else
{
if
(
!
MCIAVI_GetInfo
(
wma
))
dwRet
=
MCIERR_INVALID_FILE
;
else
if
(
!
MCIAVI_OpenVideo
(
wma
))
dwRet
=
MCIERR_CANNOT_LOAD_DRIVER
;
else
if
(
!
MCIAVI_CreateWindow
(
wma
,
dwFlags
,
lpOpenParms
))
dwRet
=
MCIERR_CREATEWINDOW
;
}
wma
->
lpFileName
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
strlenW
(
lpOpenParms
->
lpstrElementName
)
+
1
)
*
sizeof
(
WCHAR
));
strcpyW
(
wma
->
lpFileName
,
lpOpenParms
->
lpstrElementName
);
wma
->
hFile
=
mmioOpenW
(
lpOpenParms
->
lpstrElementName
,
NULL
,
MMIO_ALLOCBUF
|
MMIO_DENYWRITE
|
MMIO_READ
);
if
(
wma
->
hFile
==
0
)
{
WARN
(
"can't find file=%s!
\n
"
,
debugstr_w
(
lpOpenParms
->
lpstrElementName
));
dwRet
=
MCIERR_FILE_NOT_FOUND
;
}
else
{
if
(
!
MCIAVI_GetInfo
(
wma
))
dwRet
=
MCIERR_INVALID_FILE
;
else
if
(
!
MCIAVI_OpenVideo
(
wma
))
dwRet
=
MCIERR_CANNOT_LOAD_DRIVER
;
else
if
(
!
MCIAVI_CreateWindow
(
wma
,
dwFlags
,
lpOpenParms
))
dwRet
=
MCIERR_CREATEWINDOW
;
}
}
else
{
FIXME
(
"Don't record yet
\n
"
);
...
...
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