dnsapi: Make type_to_str() into a proper debugstr function.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2021-11-02 12:45:10 +01:00
parent 0b7dba8c71
commit 87f94202bb
4 changed files with 9 additions and 9 deletions

View File

@ -119,7 +119,7 @@ static inline char *strdup_ua( const char *src )
return dst;
}
extern const char *type_to_str( unsigned short ) DECLSPEC_HIDDEN;
extern const char *debugstr_type( unsigned short ) DECLSPEC_HIDDEN;
struct resolv_funcs
{

View File

@ -109,7 +109,7 @@ static DWORD dnsapi_umbstowcs( const char *src, WCHAR *dst, DWORD dstlen )
}
}
static const char *debugstr_type( unsigned short type )
const char *debugstr_type( unsigned short type )
{
const char *str;

View File

@ -110,7 +110,7 @@ static const char *debugstr_query_request(const DNS_QUERY_REQUEST *req)
return "(null)";
return wine_dbg_sprintf("{%d %s %s %x%08x %p %d %p %p}", req->Version,
debugstr_w(req->QueryName), type_to_str(req->QueryType),
debugstr_w(req->QueryName), debugstr_type(req->QueryType),
(UINT32)(req->QueryOptions>>32u), (UINT32)req->QueryOptions, req->pDnsServerList,
req->InterfaceIndex, req->pQueryCompletionCallback, req->pQueryContext);
}
@ -136,7 +136,7 @@ DNS_STATUS WINAPI DnsQuery_A( PCSTR name, WORD type, DWORD options, PVOID server
DNS_RECORDW *resultW;
DNS_STATUS status;
TRACE( "(%s,%s,0x%08x,%p,%p,%p)\n", debugstr_a(name), type_to_str( type ),
TRACE( "(%s,%s,0x%08x,%p,%p,%p)\n", debugstr_a(name), debugstr_type( type ),
options, servers, result, reserved );
if (!name || !result)
@ -169,7 +169,7 @@ DNS_STATUS WINAPI DnsQuery_UTF8( PCSTR name, WORD type, DWORD options, PVOID ser
{
DNS_STATUS ret = DNS_ERROR_RCODE_NOT_IMPLEMENTED;
TRACE( "(%s,%s,0x%08x,%p,%p,%p)\n", debugstr_a(name), type_to_str( type ),
TRACE( "(%s,%s,0x%08x,%p,%p,%p)\n", debugstr_a(name), debugstr_type( type ),
options, servers, result, reserved );
if (!name || !result)
@ -200,7 +200,7 @@ DNS_STATUS WINAPI DnsQuery_W( PCWSTR name, WORD type, DWORD options, PVOID serve
DNS_RECORDA *resultA;
DNS_STATUS status;
TRACE( "(%s,%s,0x%08x,%p,%p,%p)\n", debugstr_w(name), type_to_str( type ),
TRACE( "(%s,%s,0x%08x,%p,%p,%p)\n", debugstr_w(name), debugstr_type( type ),
options, servers, result, reserved );
if (!name || !result)

View File

@ -29,7 +29,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(dnsapi);
const char *type_to_str( unsigned short type )
const char *debugstr_type( unsigned short type )
{
switch (type)
{
@ -91,7 +91,7 @@ const char *type_to_str( unsigned short type )
X(DNS_TYPE_WINS)
X(DNS_TYPE_WINSR)
#undef X
default: { static char tmp[7]; sprintf( tmp, "0x%04x", type ); return tmp; }
default: return wine_dbg_sprintf( "0x%04x", type );
}
}
@ -339,7 +339,7 @@ BOOL WINAPI DnsRecordCompare( PDNS_RECORD r1, PDNS_RECORD r2 )
break;
}
default:
FIXME( "unknown type: %s\n", type_to_str( r1->wType ) );
FIXME( "unknown type: %s\n", debugstr_type( r1->wType ) );
return FALSE;
}
return TRUE;