aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog6
-rw-r--r--gdb/location.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 91e8b71..62aa129 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2016-08-15 Yao Qi <yao.qi@linaro.org>
+
+ * location.c (explicit_location_lex_one): Compare the return
+ value of strncmp with zero. Don't check (*inp)[9]. Increment
+ *inp by 8.
+
2016-08-11 Pedro Alves <palves@redhat.com>
PR gdb/20413
diff --git a/gdb/location.c b/gdb/location.c
index 071d262..65116c7 100644
--- a/gdb/location.c
+++ b/gdb/location.c
@@ -498,9 +498,8 @@ explicit_location_lex_one (const char **inp,
{
/* Special case: C++ operator,. */
if (language->la_language == language_cplus
- && strncmp (*inp, "operator", 8)
- && (*inp)[9] == ',')
- (*inp) += 9;
+ && strncmp (*inp, "operator", 8) == 0)
+ (*inp) += 8;
++(*inp);
}
}