[PATCH] winedbg: Avoid unneeded strlen() calls. (original) (raw)
Francois Gouget fgouget at free.fr
Mon Dec 9 02:47:45 CST 2019
- Previous message (by thread): [PATCH] user32/tests: Fix the spelling of an ok() message.
- Next message (by thread): [PATCH] cmd: Avoid unneeded strlenW() calls.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Note that target_xml is an array and thus cannot be NULL.
Signed-off-by: Francois Gouget <fgouget at free.fr>
programs/winedbg/gdbproxy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/programs/winedbg/gdbproxy.c b/programs/winedbg/gdbproxy.c index b7f59ee05be..85ebc882a62 100644 --- a/programs/winedbg/gdbproxy.c +++ b/programs/winedbg/gdbproxy.c @@ -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; }
2.20.1
- Previous message (by thread): [PATCH] user32/tests: Fix the spelling of an ok() message.
- Next message (by thread): [PATCH] cmd: Avoid unneeded strlenW() calls.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]