/* Translate an external name string into a user-visible name. */
#define EXTERNAL_NAME(string, abfd) \
- (string[0] == bfd_get_symbol_leading_char (abfd) \
- ? string + 1 : string)
+ (*string && *string == bfd_get_symbol_leading_char (abfd) \
+ ? string + 1 : string)
/* To be an sdb debug type, type must have at least a basic or primary
derived type. Using this rather than checking against T_NULL is
Record it as global even if it's local, not global, so
lookup_minimal_symbol can find it. We don't check symbol_leading_char
because for SunOS4 it always is '_'. */
- if (name[8] == 'C' && strcmp ("__DYNAMIC", name) == 0)
+ if (strcmp ("__DYNAMIC", name) == 0)
ms_type = mst_data;
/* Same with virtual function tables, both global and static. */
{
const char *tempstring = name;
- if (tempstring[0] == bfd_get_symbol_leading_char (objfile->obfd.get ()))
+ if (*tempstring
+ && *tempstring == bfd_get_symbol_leading_char (objfile->obfd.get ()))
++tempstring;
if (is_vtable_name (tempstring))
ms_type = mst_data;
processing_gcc_compilation = 1;
else if (strcmp (namestring, GCC2_COMPILED_FLAG_SYMBOL) == 0)
processing_gcc_compilation = 2;
- if (tempstring[0] == bfd_get_symbol_leading_char (symfile_bfd))
+ if (*tempstring
+ && *tempstring == bfd_get_symbol_leading_char (symfile_bfd))
++tempstring;
if (startswith (tempstring, "__gnu_compiled"))
processing_gcc_compilation = 2;
struct bound_minimal_symbol msym;
const char *name = sym->name;
- if (name[0] == bfd_get_symbol_leading_char (main_objfile->obfd.get ()))
+ if (*name
+ && *name == bfd_get_symbol_leading_char (main_objfile->obfd.get ()))
++name;
msym = lookup_minimal_symbol (name, NULL, main_objfile);
if (msym.minsym == NULL)