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
0beeffa9
Commit
0beeffa9
authored
Nov 20, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Avoid using sizeof() in traces.
parent
15fd7a02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
message16.c
dlls/winmm/message16.c
+10
-13
No files found.
dlls/winmm/message16.c
View file @
0beeffa9
...
...
@@ -968,11 +968,10 @@ static WINMM_MapType MMDRV_WaveIn_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, DWO
/* FIXME: nothing on wh32->lpNext */
/* could link the wh32->lpNext at this level for memory house keeping */
wh32
->
lpNext
=
wh16
;
/* for reuse in unprepare and write */
TRACE
(
"wh16=%08x wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p
\n
"
,
seg_ptr
+
sizeof
(
LPWAVEHDR
),
wh16
->
lpData
,
wh32
->
dwBufferLength
,
wh32
->
lpData
);
*
lpParam1
=
seg_ptr
+
sizeof
(
LPWAVEHDR
);
*
lpParam2
=
sizeof
(
WAVEHDR
);
TRACE
(
"wh16=%08lx wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p
\n
"
,
*
lpParam1
,
wh16
->
lpData
,
wh32
->
dwBufferLength
,
wh32
->
lpData
);
ret
=
WINMM_MAP_OKMEM
;
}
else
{
...
...
@@ -990,14 +989,14 @@ static WINMM_MapType MMDRV_WaveIn_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, DWO
assert
(
*
(
LPWAVEHDR
*
)
ptr
==
wh32
);
TRACE
(
"wh16=%08x wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p
\n
"
,
seg_ptr
+
sizeof
(
LPWAVEHDR
),
wh16
->
lpData
,
wh32
->
dwBufferLength
,
wh32
->
lpData
);
if
(
wMsg
==
WIDM_ADDBUFFER
)
memcpy
((
LPSTR
)
wh16
+
sizeof
(
WAVEHDR
),
wh32
->
lpData
,
wh32
->
dwBufferLength
);
*
lpParam1
=
seg_ptr
+
sizeof
(
LPWAVEHDR
);
*
lpParam2
=
sizeof
(
WAVEHDR
);
TRACE
(
"wh16=%08lx wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p
\n
"
,
*
lpParam1
,
wh16
->
lpData
,
wh32
->
dwBufferLength
,
wh32
->
lpData
);
/* dwBufferLength can be reduced between prepare & write */
if
(
wMsg
==
WIDM_ADDBUFFER
&&
wh16
->
dwBufferLength
<
wh32
->
dwBufferLength
)
{
ERR
(
"Size of buffer has been increased from %d to %d, keeping initial value
\n
"
,
...
...
@@ -1528,11 +1527,10 @@ static WINMM_MapType MMDRV_WaveOut_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, DW
/* FIXME: nothing on wh32->lpNext */
/* could link the wh32->lpNext at this level for memory house keeping */
wh32
->
lpNext
=
wh16
;
/* for reuse in unprepare and write */
TRACE
(
"wh16=%08x wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p
\n
"
,
seg_ptr
+
sizeof
(
LPWAVEHDR
),
wh16
->
lpData
,
wh32
->
dwBufferLength
,
wh32
->
lpData
);
*
lpParam1
=
seg_ptr
+
sizeof
(
LPWAVEHDR
);
*
lpParam2
=
sizeof
(
WAVEHDR
);
TRACE
(
"wh16=%08lx wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p
\n
"
,
*
lpParam1
,
wh16
->
lpData
,
wh32
->
dwBufferLength
,
wh32
->
lpData
);
ret
=
WINMM_MAP_OKMEM
;
}
else
{
...
...
@@ -1550,15 +1548,14 @@ static WINMM_MapType MMDRV_WaveOut_Map32WTo16 (UINT wMsg, LPDWORD lpdwUser, DW
assert
(
*
(
LPWAVEHDR
*
)
ptr
==
wh32
);
TRACE
(
"wh16=%08x wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p
\n
"
,
seg_ptr
+
sizeof
(
LPWAVEHDR
),
wh16
->
lpData
,
wh32
->
dwBufferLength
,
wh32
->
lpData
);
if
(
wMsg
==
WODM_WRITE
)
memcpy
((
LPSTR
)
wh16
+
sizeof
(
WAVEHDR
),
wh32
->
lpData
,
wh32
->
dwBufferLength
);
*
lpParam1
=
seg_ptr
+
sizeof
(
LPWAVEHDR
);
*
lpParam2
=
sizeof
(
WAVEHDR
);
TRACE
(
"wh16=%08lx wh16->lpData=%p wh32->buflen=%u wh32->lpData=%p
\n
"
,
*
lpParam1
,
wh16
->
lpData
,
wh32
->
dwBufferLength
,
wh32
->
lpData
);
/* dwBufferLength can be reduced between prepare & write */
if
(
wMsg
==
WODM_WRITE
&&
wh16
->
dwBufferLength
<
wh32
->
dwBufferLength
)
{
ERR
(
"Size of buffer has been increased from %d to %d, keeping initial value
\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