Alexandre Julliard : winmm: Avoid using sizeof() in traces.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Nov 20 05:52:11 CST 2006


Module: wine
Branch: master
Commit: 0beeffa935be246a91d0f5febdfc7dac8c4fe60f
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0beeffa935be246a91d0f5febdfc7dac8c4fe60f

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Nov 20 11:27:18 2006 +0100

winmm: Avoid using sizeof() in traces.

---

 dlls/winmm/message16.c |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/dlls/winmm/message16.c b/dlls/winmm/message16.c
index 14dbbf4..6ecf34b 100644
--- a/dlls/winmm/message16.c
+++ b/dlls/winmm/message16.c
@@ -968,11 +968,10 @@ static  WINMM_MapType	MMDRV_WaveIn_Map32
 		/* 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_Map32
 
 	    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_Map3
 		/* 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_Map3
 
 	    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",




More information about the wine-cvs mailing list