winedbg: Avoid unneeded strlen() calls.
Note that target_xml is an array and thus cannot be NULL. Signed-off-by: Francois Gouget <fgouget@free.fr> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cca965d94e
commit
9fbfa988f2
|
@ -1615,7 +1615,7 @@ static enum packet_return packet_query(struct gdb_context* gdbctx)
|
|||
return packet_ok;
|
||||
if (strncmp(gdbctx->in_packet, "Supported", 9) == 0)
|
||||
{
|
||||
if (strlen(target_xml))
|
||||
if (*target_xml)
|
||||
return packet_reply(gdbctx, "PacketSize=400;qXfer:features:read+");
|
||||
else
|
||||
{
|
||||
|
@ -1652,7 +1652,7 @@ static enum packet_return packet_query(struct gdb_context* gdbctx)
|
|||
}
|
||||
break;
|
||||
case 'X':
|
||||
if (strlen(target_xml) && strncmp(gdbctx->in_packet, "Xfer:features:read:target.xml", 29) == 0)
|
||||
if (*target_xml && strncmp(gdbctx->in_packet, "Xfer:features:read:target.xml", 29) == 0)
|
||||
return packet_reply(gdbctx, target_xml);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue