Commit 9fbfa988 authored by Francois Gouget's avatar Francois Gouget Committed by Alexandre Julliard

winedbg: Avoid unneeded strlen() calls.

Note that target_xml is an array and thus cannot be NULL. Signed-off-by: 's avatarFrancois Gouget <fgouget@free.fr> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent cca965d9
...@@ -1615,7 +1615,7 @@ static enum packet_return packet_query(struct gdb_context* gdbctx) ...@@ -1615,7 +1615,7 @@ static enum packet_return packet_query(struct gdb_context* gdbctx)
return packet_ok; return packet_ok;
if (strncmp(gdbctx->in_packet, "Supported", 9) == 0) if (strncmp(gdbctx->in_packet, "Supported", 9) == 0)
{ {
if (strlen(target_xml)) if (*target_xml)
return packet_reply(gdbctx, "PacketSize=400;qXfer:features:read+"); return packet_reply(gdbctx, "PacketSize=400;qXfer:features:read+");
else else
{ {
...@@ -1652,7 +1652,7 @@ static enum packet_return packet_query(struct gdb_context* gdbctx) ...@@ -1652,7 +1652,7 @@ static enum packet_return packet_query(struct gdb_context* gdbctx)
} }
break; break;
case 'X': 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); return packet_reply(gdbctx, target_xml);
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment