aboutsummaryrefslogtreecommitdiff
path: root/gdb/cp-support.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2010-05-13 23:53:32 +0000
committerMichael Snyder <msnyder@vmware.com>2010-05-13 23:53:32 +0000
commitc5504eafbce9ab0ea4d9aa7f222d7b75a6c77531 (patch)
tree296c321c47907882ffc668af19edd04ec67851c3 /gdb/cp-support.c
parentcc59ec59c88e97e6e674db776fed9b197dffce33 (diff)
downloadgdb-c5504eafbce9ab0ea4d9aa7f222d7b75a6c77531.zip
gdb-c5504eafbce9ab0ea4d9aa7f222d7b75a6c77531.tar.gz
gdb-c5504eafbce9ab0ea4d9aa7f222d7b75a6c77531.tar.bz2
2010-05-13 Michael Snyder <msnyder@vmware.com>
* charset.c: White space. * c-lang.c: White space. * cli-out.c: White space. * coffread.c: White space. * complaints.c: White space. * completer.c: White space. * corefile.c: White space. * corelow.c: White space. * cp-abi.c: White space. * cp-namespace.c: White space. * cp-support.c: White space. * cp-valprint.c: White space. * c-typeprint.c: White space. * c-valprint.c: White space.
Diffstat (limited to 'gdb/cp-support.c')
-rw-r--r--gdb/cp-support.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index 8f447ca..e4b5d4d 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -715,13 +715,13 @@ static void
make_symbol_overload_list_namespace (const char *func_name,
const char *namespace)
{
-
if (namespace[0] == '\0')
make_symbol_overload_list_qualified (func_name);
else
{
char *concatenated_name
= alloca (strlen (namespace) + 2 + strlen (func_name) + 1);
+
strcpy (concatenated_name, namespace);
strcat (concatenated_name, "::");
strcat (concatenated_name, func_name);
@@ -996,18 +996,20 @@ cp_validate_operator (const char *input)
if (strncmp (p, "operator", 8) == 0)
{
int valid = 0;
- p += 8;
+ p += 8;
SKIP_SPACE (p);
for (i = 0; i < sizeof (operator_tokens) / sizeof (operator_tokens[0]);
++i)
{
int length = strlen (operator_tokens[i]);
+
/* By using strncmp here, we MUST have operator_tokens ordered!
See additional notes where operator_tokens is defined above. */
if (strncmp (p, operator_tokens[i], length) == 0)
{
const char *op = p;
+
valid = 1;
p += length;