aboutsummaryrefslogtreecommitdiff
path: root/gdb/stabsread.c
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1997-10-23 22:42:07 +0000
committerJeff Law <law@redhat.com>1997-10-23 22:42:07 +0000
commitcdecdcc4f585e4fd80eccd42f8ae8a8334702dc1 (patch)
tree9efd4b8723288ca259a883368cf7f1d3407d7c4a /gdb/stabsread.c
parent04789fe9ab73e452b3404b6e6c8b1cec51f96e9e (diff)
downloadgdb-cdecdcc4f585e4fd80eccd42f8ae8a8334702dc1.zip
gdb-cdecdcc4f585e4fd80eccd42f8ae8a8334702dc1.tar.gz
gdb-cdecdcc4f585e4fd80eccd42f8ae8a8334702dc1.tar.bz2
* dbxread.c (process_one_symbol): Put back initialization
of a variable lost during last change. Don't perform assignment inside conditionals. * stabsread.c (symbol_reference_defined): Return -1 for error/not found. All callers changed appropriately. (define_symbol): Don't perform assignment inside conditionals.
Diffstat (limited to 'gdb/stabsread.c')
-rw-r--r--gdb/stabsread.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/stabsread.c b/gdb/stabsread.c
index 872e07e..62c3359 100644
--- a/gdb/stabsread.c
+++ b/gdb/stabsread.c
@@ -1276,7 +1276,7 @@ symbol_reference_defined (string)
/* Must be a reference. Either the symbol has already been defined,
or this is a forward reference to it. */
*string = p;
- return 0;
+ return -1;
}
}
@@ -1393,7 +1393,8 @@ define_symbol (valu, string, desc, type, objfile)
defined symbol, so add it to the alias list of the previously
defined symbol. */
s = string;
- if (refnum = symbol_reference_defined (&s), refnum)
+ refnum = symbol_reference_defined (&s);
+ if (refnum >= 0)
ref_add (refnum, sym, string, SYMBOL_VALUE (sym));
else
resolve_symbol_reference (objfile, sym, string);
@@ -1401,7 +1402,7 @@ define_symbol (valu, string, desc, type, objfile)
/* S..P contains the name of the symbol. We need to store
the correct name into SYMBOL_NAME. */
nlen = p - s;
- if (refnum)
+ if (refnum >= 0)
{
if (nlen > 0)
{