Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5b3121b6
Commit
5b3121b6
authored
Jul 19, 2011
by
Jörg Höhle
Committed by
Alexandre Julliard
Sep 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mciseq: Remove superfluous NULL pointer check.
parent
a7bad0bd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
23 deletions
+13
-23
mcimidi.c
dlls/mciseq/mcimidi.c
+13
-23
No files found.
dlls/mciseq/mcimidi.c
View file @
5b3121b6
...
...
@@ -231,8 +231,7 @@ static DWORD MIDI_mciReadByte(WINE_MCIMIDI* wmm, BYTE *lpbyt)
{
DWORD
ret
=
0
;
if
(
lpbyt
==
NULL
||
mmioRead
(
wmm
->
hFile
,
(
HPSTR
)
lpbyt
,
sizeof
(
BYTE
))
!=
(
long
)
sizeof
(
BYTE
))
{
if
(
mmioRead
(
wmm
->
hFile
,
(
HPSTR
)
lpbyt
,
sizeof
(
BYTE
))
!=
(
long
)
sizeof
(
BYTE
))
{
WARN
(
"Error reading wmm=%p
\n
"
,
wmm
);
ret
=
MCIERR_INVALID_FILE
;
}
...
...
@@ -248,8 +247,7 @@ static DWORD MIDI_mciReadWord(WINE_MCIMIDI* wmm, LPWORD lpw)
BYTE
hibyte
,
lobyte
;
DWORD
ret
=
MCIERR_INVALID_FILE
;
if
(
lpw
!=
NULL
&&
MIDI_mciReadByte
(
wmm
,
&
hibyte
)
==
0
&&
if
(
MIDI_mciReadByte
(
wmm
,
&
hibyte
)
==
0
&&
MIDI_mciReadByte
(
wmm
,
&
lobyte
)
==
0
)
{
*
lpw
=
((
WORD
)
hibyte
<<
8
)
+
lobyte
;
ret
=
0
;
...
...
@@ -265,8 +263,7 @@ static DWORD MIDI_mciReadLong(WINE_MCIMIDI* wmm, LPDWORD lpdw)
WORD
hiword
,
loword
;
DWORD
ret
=
MCIERR_INVALID_FILE
;
if
(
lpdw
!=
NULL
&&
MIDI_mciReadWord
(
wmm
,
&
hiword
)
==
0
&&
if
(
MIDI_mciReadWord
(
wmm
,
&
hiword
)
==
0
&&
MIDI_mciReadWord
(
wmm
,
&
loword
)
==
0
)
{
*
lpdw
=
MAKELONG
(
loword
,
hiword
);
ret
=
0
;
...
...
@@ -281,24 +278,17 @@ static WORD MIDI_mciReadVaryLen(WINE_MCIMIDI* wmm, LPDWORD lpdw)
{
BYTE
byte
;
DWORD
value
=
0
;
WORD
ret
=
0
;
WORD
len
=
0
;
if
(
lpdw
==
NULL
)
{
ret
=
MCIERR_INVALID_FILE
;
}
else
{
do
{
if
(
MIDI_mciReadByte
(
wmm
,
&
byte
)
!=
0
)
{
return
0
;
}
value
=
(
value
<<
7
)
+
(
byte
&
0x7F
);
ret
++
;
}
while
(
byte
&
0x80
);
*
lpdw
=
value
;
/*
TRACE("val=%08X\n", value);
*/
}
return
ret
;
do
{
if
(
MIDI_mciReadByte
(
wmm
,
&
byte
)
!=
0
)
{
return
0
;
}
value
=
(
value
<<
7
)
+
(
byte
&
0x7F
);
len
++
;
}
while
(
byte
&
0x80
);
*
lpdw
=
value
;
return
len
;
}
/**************************************************************************
...
...
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