On 14 March 2016 at 10:36, Michael Stefaniuc mstefani@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. 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.
On 03/14/2016 10:56 AM, Henri Verbeet wrote:
On 14 March 2016 at 10:36, Michael Stefaniuc mstefani@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