* 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.
This commit is contained in:
Jeff Law 1997-10-23 22:42:07 +00:00
parent 04789fe9ab
commit cdecdcc4f5
2 changed files with 13 additions and 3 deletions

View file

@ -1,3 +1,12 @@
Thu Oct 23 16:16:04 1997 Jeff Law (law@fast.cs.utah.edu)
* 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.
Wed Oct 22 13:04:52 1997 Jeffrey A Law (law@cygnus.com) Wed Oct 22 13:04:52 1997 Jeffrey A Law (law@cygnus.com)
* mdebugread.c (psymtab_to_symtab_1): Handle new live range stabs * mdebugread.c (psymtab_to_symtab_1): Handle new live range stabs

View file

@ -1276,7 +1276,7 @@ symbol_reference_defined (string)
/* Must be a reference. Either the symbol has already been defined, /* Must be a reference. Either the symbol has already been defined,
or this is a forward reference to it. */ or this is a forward reference to it. */
*string = p; *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, so add it to the alias list of the previously
defined symbol. */ defined symbol. */
s = string; 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)); ref_add (refnum, sym, string, SYMBOL_VALUE (sym));
else else
resolve_symbol_reference (objfile, sym, string); 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 /* S..P contains the name of the symbol. We need to store
the correct name into SYMBOL_NAME. */ the correct name into SYMBOL_NAME. */
nlen = p - s; nlen = p - s;
if (refnum) if (refnum >= 0)
{ {
if (nlen > 0) if (nlen > 0)
{ {