d3drm: Use debugstr_a to print a string that can be NULL.

Michael Stefaniuc mstefani at redhat.com
Mon Mar 14 06:04:31 CDT 2016


On 03/14/2016 10:56 AM, Henri Verbeet wrote:
> On 14 March 2016 at 10:36, Michael Stefaniuc <mstefani at redhat.de> wrote:
>> -    TRACE("Mesh name is '%s'\n", This->name ? This->name : "");
>> +    TRACE("Mesh name is '%s'\n", debugstr_a(This->name));
> You should remove the quotes, since debugstr_a() also adds quotes.
Thanks, I have resubmitted.

> Note that just being external data is enough reason to use
> debugstr_a(), it doesn't matter much if it can be NULL or not in that
> regard.
True, but I have detected them based on the NULL check.
Detecting them based on strings passed to public APIs is possible too
though not that trivial to do with coccinelle.

bye
	michael



More information about the wine-devel mailing list