2003-01-09 Andrew Cagney <ac131313@redhat.com>

* somsolib.h: Fix function indentation.
	* disasm.c, buildsym.c, buildsym.h: Eliminate PTR.
	* gnu-v2-abi.c, f-typeprint.c, x86-64-linux-tdep.c: Eliminate STREQ.
	* demangle.c, ax-gdb.c, c-valprint.c: Eliminate STREQ.
	* alpha-osf1-tdep.c, corefile.c: Eliminate STREQ.
	* somsolib.c, inftarg.c: Remove assignment in if conditional.
This commit is contained in:
Andrew Cagney 2003-01-09 18:30:32 +00:00
parent 4ef3f3be7a
commit bde581776e
15 changed files with 26 additions and 17 deletions

View file

@ -1,5 +1,12 @@
2003-01-09 Andrew Cagney <ac131313@redhat.com> 2003-01-09 Andrew Cagney <ac131313@redhat.com>
* somsolib.h: Fix function indentation.
* disasm.c, buildsym.c, buildsym.h: Eliminate PTR.
* gnu-v2-abi.c, f-typeprint.c, x86-64-linux-tdep.c: Eliminate STREQ.
* demangle.c, ax-gdb.c, c-valprint.c: Eliminate STREQ.
* alpha-osf1-tdep.c, corefile.c: Eliminate STREQ.
* somsolib.c, inftarg.c: Remove assignment in if conditional.
* infrun.c (follow_fork): Use ISO C definition. * infrun.c (follow_fork): Use ISO C definition.
* expprint.c (print_subexp): Use xfree instead of free. * expprint.c (print_subexp): Use xfree instead of free.
* charset.c: Include "gdb_string.h" instead of <string.h>. * charset.c: Include "gdb_string.h" instead of <string.h>.

View file

@ -42,7 +42,7 @@ alpha_osf1_skip_sigtramp_frame (struct frame_info *frame, CORE_ADDR pc)
static int static int
alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, char *func_name) alpha_osf1_pc_in_sigtramp (CORE_ADDR pc, char *func_name)
{ {
return (func_name != NULL && STREQ ("__sigtramp", func_name)); return (func_name != NULL && strcmp ("__sigtramp", func_name) == 0);
} }
static CORE_ADDR static CORE_ADDR

View file

@ -1157,7 +1157,7 @@ find_field (struct type *type, char *name)
{ {
char *this_name = TYPE_FIELD_NAME (type, i); char *this_name = TYPE_FIELD_NAME (type, i);
if (this_name && STREQ (name, this_name)) if (this_name && strcmp (name, this_name) == 0)
return i; return i;
if (this_name[0] == '\0') if (this_name[0] == '\0')

View file

@ -152,7 +152,7 @@ find_symbol_in_list (struct pending *list, char *name, int length)
/* ARGSUSED */ /* ARGSUSED */
void void
really_free_pendings (PTR dummy) really_free_pendings (void *dummy)
{ {
struct pending *next, *next1; struct pending *next, *next1;

View file

@ -233,7 +233,7 @@ extern void finish_block (struct symbol *symbol,
CORE_ADDR start, CORE_ADDR end, CORE_ADDR start, CORE_ADDR end,
struct objfile *objfile); struct objfile *objfile);
extern void really_free_pendings (PTR dummy); extern void really_free_pendings (void *dummy);
extern void start_subfile (char *name, char *dirname); extern void start_subfile (char *name, char *dirname);

View file

@ -515,7 +515,7 @@ c_value_print (struct value *val, struct ui_file *stream, int format,
if (TYPE_CODE (type) == TYPE_CODE_PTR && if (TYPE_CODE (type) == TYPE_CODE_PTR &&
TYPE_NAME (type) == NULL && TYPE_NAME (type) == NULL &&
TYPE_NAME (TYPE_TARGET_TYPE (type)) != NULL && TYPE_NAME (TYPE_TARGET_TYPE (type)) != NULL &&
STREQ (TYPE_NAME (TYPE_TARGET_TYPE (type)), "char")) strcmp (TYPE_NAME (TYPE_TARGET_TYPE (type)), "char") == 0)
{ {
/* Print nothing */ /* Print nothing */
} }

View file

@ -439,7 +439,7 @@ static void set_gnutarget_command (char *, int, struct cmd_list_element *);
static void static void
set_gnutarget_command (char *ignore, int from_tty, struct cmd_list_element *c) set_gnutarget_command (char *ignore, int from_tty, struct cmd_list_element *c)
{ {
if (STREQ (gnutarget_string, "auto")) if (strcmp (gnutarget_string, "auto") == 0)
gnutarget = NULL; gnutarget = NULL;
else else
gnutarget = gnutarget_string; gnutarget = gnutarget_string;

View file

@ -87,8 +87,8 @@ set_demangling_command (char *ignore, int from_tty, struct cmd_list_element *c)
dem->demangling_style != unknown_demangling; dem->demangling_style != unknown_demangling;
dem++) dem++)
{ {
if (STREQ (current_demangling_style_string, if (strcmp (current_demangling_style_string,
dem->demangling_style_name)) dem->demangling_style_name) == 0)
{ {
current_demangling_style = dem->demangling_style; current_demangling_style = dem->demangling_style;
break; break;

View file

@ -66,7 +66,7 @@ gdb_dis_asm_read_memory (bfd_vma memaddr, bfd_byte * myaddr,
} }
static int static int
compare_lines (const PTR mle1p, const PTR mle2p) compare_lines (const void *mle1p, const void *mle2p)
{ {
struct dis_line_entry *mle1, *mle2; struct dis_line_entry *mle1, *mle2;
int val; int val;

View file

@ -355,7 +355,7 @@ f_type_print_base (struct type *type, struct ui_file *stream, int show,
through as TYPE_CODE_INT since dbxstclass.h is so through as TYPE_CODE_INT since dbxstclass.h is so
C-oriented, we must change these to "character" from "char". */ C-oriented, we must change these to "character" from "char". */
if (STREQ (TYPE_NAME (type), "char")) if (strcmp (TYPE_NAME (type), "char") == 0)
fprintf_filtered (stream, "character"); fprintf_filtered (stream, "character");
else else
goto default_case; goto default_case;

View file

@ -329,8 +329,8 @@ vb_match (struct type *type, int index, struct type *basetype)
if (TYPE_NAME (basetype) != NULL if (TYPE_NAME (basetype) != NULL
&& TYPE_NAME (TYPE_TARGET_TYPE (fieldtype)) != NULL && TYPE_NAME (TYPE_TARGET_TYPE (fieldtype)) != NULL
&& STREQ (TYPE_NAME (basetype), && strcmp (TYPE_NAME (basetype),
TYPE_NAME (TYPE_TARGET_TYPE (fieldtype)))) TYPE_NAME (TYPE_TARGET_TYPE (fieldtype))) == 0)
return 1; return 1;
return 0; return 0;
} }

View file

@ -649,7 +649,8 @@ _initialize_inftarg (void)
#define PROC_NAME_FMT "/proc/%05d" #define PROC_NAME_FMT "/proc/%05d"
#endif #endif
sprintf (procname, PROC_NAME_FMT, getpid ()); sprintf (procname, PROC_NAME_FMT, getpid ());
if ((fd = open (procname, O_RDONLY)) >= 0) fd = open (procname, O_RDONLY);
if (fd >= 0)
{ {
close (fd); close (fd);
return; return;

View file

@ -418,7 +418,8 @@ som_solib_add (char *arg_string, int from_tty, struct target_ops *target, int re
int threshold_warning_given = 0; int threshold_warning_given = 0;
/* First validate our arguments. */ /* First validate our arguments. */
if ((re_err = re_comp (arg_string ? arg_string : ".")) != NULL) re_err = re_comp (arg_string ? arg_string : ".");
if (re_err != NULL)
{ {
error ("Invalid regexp: %s", re_err); error ("Invalid regexp: %s", re_err);
} }

View file

@ -36,8 +36,8 @@ extern void som_solib_add (char *, int, struct target_ops *, int);
extern CORE_ADDR som_solib_get_got_by_pc (CORE_ADDR); extern CORE_ADDR som_solib_get_got_by_pc (CORE_ADDR);
extern int extern int som_solib_section_offsets (struct objfile *,
som_solib_section_offsets (struct objfile *, struct section_offsets *); struct section_offsets *);
/* Function to be called when the inferior starts up, to discover the names /* Function to be called when the inferior starts up, to discover the names
of shared libraries that are dynamically linked, the base addresses to of shared libraries that are dynamically linked, the base addresses to

View file

@ -147,7 +147,7 @@ int
x86_64_linux_in_sigtramp (CORE_ADDR pc, char *name) x86_64_linux_in_sigtramp (CORE_ADDR pc, char *name)
{ {
if (name) if (name)
return STREQ ("__restore_rt", name); return strcmp ("__restore_rt", name) == 0;
return (x86_64_linux_sigtramp_start (pc) != 0); return (x86_64_linux_sigtramp_start (pc) != 0);
} }