diff options
author | Sergio Durigan Junior <sergiodj@redhat.com> | 2015-02-09 18:58:12 -0500 |
---|---|---|
committer | Sergio Durigan Junior <sergiodj@redhat.com> | 2015-02-09 19:00:55 -0500 |
commit | 0b24eb2de5a6dbefe48fd57fcf5d0e7fb24895d4 (patch) | |
tree | 54a4430a7f57390181ba75dee52846076cd1e2d6 /gdb | |
parent | 134cdf8ed364a702e89f9d4525a361068d502893 (diff) | |
download | gdb-0b24eb2de5a6dbefe48fd57fcf5d0e7fb24895d4.zip gdb-0b24eb2de5a6dbefe48fd57fcf5d0e7fb24895d4.tar.gz gdb-0b24eb2de5a6dbefe48fd57fcf5d0e7fb24895d4.tar.bz2 |
PR remote/17946: Fix wrong comparison of pointer against char
We were comparing a pointer against a char on remote.c. 'dcb' filed a
bug to inform us about that. I pushed the following patch under the
obvious rule.
gdb/ChangeLog:
2015-02-09 Sergio Durigan Junior <sergiodj@redhat.com>
PR remote/17946
* gdb/remote.c (remote_parse_stop_reply): Fix wrong comparison
of pointer against char.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/remote.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7b989d8..be32f3e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2015-02-09 Sergio Durigan Junior <sergiodj@redhat.com> + + PR remote/17946 + * gdb/remote.c (remote_parse_stop_reply): Fix wrong comparison + of pointer against char. + 2015-02-09 Mark Wielaard <mjw@redhat.com> * c-typeprint.c (cp_type_print_method_args): Handle '_Atomic'. diff --git a/gdb/remote.c b/gdb/remote.c index 3980aad..dbfc10b 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -5682,7 +5682,7 @@ Packet: '%s'\n"), { p++; - if (p == '\0') + if (*p == '\0') ; else if (strncmp (p, "process:", sizeof ("process:") - 1) == 0) |