PR remote/17946: Fix wrong comparison of pointer against char
authorSergio Durigan Junior <sergiodj@redhat.com>
Mon, 9 Feb 2015 23:58:12 +0000 (18:58 -0500)
committerSergio Durigan Junior <sergiodj@redhat.com>
Tue, 10 Feb 2015 00:00:55 +0000 (19:00 -0500)
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.

gdb/ChangeLog
gdb/remote.c

index 7b989d877eb1bb3d7a49e70aeda37d8fa4aea17d..be32f3ef1bb747fa16bbeab20f46a6c99ea34986 100644 (file)
@@ -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'.
index 3980aadd92c1877ab22488e7a6a31976ffb5f79d..dbfc10b3091e14f28a18b4d0a3bbd13a75f48ee0 100644 (file)
@@ -5682,7 +5682,7 @@ Packet: '%s'\n"),
          {
            p++;
 
-           if (p == '\0')
+           if (*p == '\0')
              ;
            else if (strncmp (p,
                              "process:", sizeof ("process:") - 1) == 0)