From: Don Breazeal Date: Wed, 30 Sep 2015 16:58:34 +0000 (-0700) Subject: Call strprefix instead of strncmp in event parsing X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6ab24463cb63af792c958ab4455d630b5936f1b1;p=binutils-gdb.git Call strprefix instead of strncmp in event parsing This fixes a typo that used strncmp instead of strprefix when checking for an exec event in a stop reply packet. gdb/ChangeLog: * remote.c (remote_parse_stop_reply): Call strprefix instead of strncmp. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3d883a1327e..2c2aa9ee7f2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2015-09-30 Don Breazeal + + * remote.c (remote_parse_stop_reply): Call strprefix instead + of strncmp. + 2015-09-30 Simon Marchi * gdbarch.sh (struct gdbarch_info): Change tdep_info's type to void *. diff --git a/gdb/remote.c b/gdb/remote.c index ea6ff6bd744..f40f79160fc 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -6227,7 +6227,7 @@ Packet: '%s'\n"), event->ws.kind = TARGET_WAITKIND_VFORK_DONE; p = skip_to_semicolon (p1 + 1); } - else if (strncmp (p, "exec", p1 - p) == 0) + else if (strprefix (p, p1, "exec")) { ULONGEST ignored; char pathname[PATH_MAX];