Henri Verbeet : winealsa.drv: Use wine_dbg_sprintf() in a few debug utility functions.
Alexandre Julliard
julliard at winehq.org
Mon Nov 30 10:42:46 CST 2009
Module: wine
Branch: master
Commit: 7151cdc8a2947bfb4a7ad17895c448c2d55fe2c1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7151cdc8a2947bfb4a7ad17895c448c2d55fe2c1
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon Nov 30 10:22:09 2009 +0100
winealsa.drv: Use wine_dbg_sprintf() in a few debug utility functions.
---
dlls/winealsa.drv/alsa.c | 12 +++---------
dlls/winealsa.drv/mixer.c | 4 +---
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/dlls/winealsa.drv/alsa.c b/dlls/winealsa.drv/alsa.c
index f16d013..4ea1f1d 100644
--- a/dlls/winealsa.drv/alsa.c
+++ b/dlls/winealsa.drv/alsa.c
@@ -220,7 +220,6 @@ int ALSA_RetrieveRingMessage(ALSA_MSG_RING* omr, enum win_wm_message *msg,
/* These strings used only for tracing */
const char * ALSA_getCmdString(enum win_wm_message msg)
{
- static char unknown[32];
#define MSG_TO_STR(x) case x: return #x
switch(msg) {
MSG_TO_STR(WINE_WM_PAUSING);
@@ -234,13 +233,11 @@ const char * ALSA_getCmdString(enum win_wm_message msg)
MSG_TO_STR(WINE_WM_STOPPING);
}
#undef MSG_TO_STR
- sprintf(unknown, "UNKNOWN(0x%08x)", msg);
- return unknown;
+ return wine_dbg_sprintf("UNKNOWN(0x%08x)", msg);
}
const char * ALSA_getMessage(UINT msg)
{
- static char unknown[32];
#define MSG_TO_STR(x) case x: return #x
switch(msg) {
MSG_TO_STR(DRVM_INIT);
@@ -282,13 +279,11 @@ const char * ALSA_getMessage(UINT msg)
MSG_TO_STR(DRV_QUERYDSOUNDDESC);
}
#undef MSG_TO_STR
- sprintf(unknown, "UNKNOWN(0x%04x)", msg);
- return unknown;
+ return wine_dbg_sprintf("UNKNOWN(0x%04x)", msg);
}
const char * ALSA_getFormat(WORD wFormatTag)
{
- static char unknown[32];
#define FMT_TO_STR(x) case x: return #x
switch(wFormatTag) {
FMT_TO_STR(WAVE_FORMAT_PCM);
@@ -298,8 +293,7 @@ const char * ALSA_getFormat(WORD wFormatTag)
FMT_TO_STR(WAVE_FORMAT_ADPCM);
}
#undef FMT_TO_STR
- sprintf(unknown, "UNKNOWN(0x%04x)", wFormatTag);
- return unknown;
+ return wine_dbg_sprintf("UNKNOWN(0x%04x)", wFormatTag);
}
/* Allow 1% deviation for sample rates (some ES137x cards) */
diff --git a/dlls/winealsa.drv/mixer.c b/dlls/winealsa.drv/mixer.c
index e5cd347..cfdf95f 100644
--- a/dlls/winealsa.drv/mixer.c
+++ b/dlls/winealsa.drv/mixer.c
@@ -77,7 +77,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(mixer);
static const char * getMessage(UINT uMsg)
{
- static char str[64];
#define MSG_TO_STR(x) case x: return #x;
switch (uMsg){
MSG_TO_STR(DRVM_INIT);
@@ -95,8 +94,7 @@ static const char * getMessage(UINT uMsg)
default: break;
}
#undef MSG_TO_STR
- sprintf(str, "UNKNOWN(%08x)", uMsg);
- return str;
+ return wine_dbg_sprintf("UNKNOWN(%08x)", uMsg);
}
static const char * getControlType(DWORD dwControlType)
More information about the wine-cvs
mailing list