This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Some easy cleanups


FYI,

Zap a few stray things from random files (each had only one ARI problem :-).

committed,
Andrew
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.

Index: alpha-osf1-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/alpha-osf1-tdep.c,v
retrieving revision 1.8
diff -u -r1.8 alpha-osf1-tdep.c
--- alpha-osf1-tdep.c	4 Jan 2003 23:38:44 -0000	1.8
+++ alpha-osf1-tdep.c	9 Jan 2003 18:27:49 -0000
@@ -42,7 +42,7 @@
 static int
 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
Index: ax-gdb.c
===================================================================
RCS file: /cvs/src/src/gdb/ax-gdb.c,v
retrieving revision 1.15
diff -u -r1.15 ax-gdb.c
--- ax-gdb.c	9 Dec 2002 03:30:44 -0000	1.15
+++ ax-gdb.c	9 Jan 2003 18:27:50 -0000
@@ -1157,7 +1157,7 @@
     {
       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;
 
       if (this_name[0] == '\0')
Index: buildsym.c
===================================================================
RCS file: /cvs/src/src/gdb/buildsym.c,v
retrieving revision 1.25
diff -u -r1.25 buildsym.c
--- buildsym.c	2 Jan 2003 14:27:26 -0000	1.25
+++ buildsym.c	9 Jan 2003 18:27:50 -0000
@@ -152,7 +152,7 @@
 
 /* ARGSUSED */
 void
-really_free_pendings (PTR dummy)
+really_free_pendings (void *dummy)
 {
   struct pending *next, *next1;
 
Index: buildsym.h
===================================================================
RCS file: /cvs/src/src/gdb/buildsym.h,v
retrieving revision 1.9
diff -u -r1.9 buildsym.h
--- buildsym.h	4 Jan 2003 22:37:46 -0000	1.9
+++ buildsym.h	9 Jan 2003 18:27:50 -0000
@@ -233,7 +233,7 @@
 			  CORE_ADDR start, CORE_ADDR end,
 			  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);
 
Index: c-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/c-valprint.c,v
retrieving revision 1.14
diff -u -r1.14 c-valprint.c
--- c-valprint.c	27 Aug 2002 22:37:06 -0000	1.14
+++ c-valprint.c	9 Jan 2003 18:27:50 -0000
@@ -515,7 +515,7 @@
       if (TYPE_CODE (type) == TYPE_CODE_PTR &&
 	  TYPE_NAME (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 */
 	}
Index: corefile.c
===================================================================
RCS file: /cvs/src/src/gdb/corefile.c,v
retrieving revision 1.20
diff -u -r1.20 corefile.c
--- corefile.c	12 Oct 2002 01:48:17 -0000	1.20
+++ corefile.c	9 Jan 2003 18:27:50 -0000
@@ -439,7 +439,7 @@
 static void
 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;
   else
     gnutarget = gnutarget_string;
Index: demangle.c
===================================================================
RCS file: /cvs/src/src/gdb/demangle.c,v
retrieving revision 1.10
diff -u -r1.10 demangle.c
--- demangle.c	11 Oct 2002 14:02:37 -0000	1.10
+++ demangle.c	9 Jan 2003 18:27:50 -0000
@@ -87,8 +87,8 @@
        dem->demangling_style != unknown_demangling; 
        dem++)
     {
-      if (STREQ (current_demangling_style_string,
-		 dem->demangling_style_name))
+      if (strcmp (current_demangling_style_string,
+		  dem->demangling_style_name) == 0)
 	{
 	  current_demangling_style = dem->demangling_style;
 	  break;
Index: disasm.c
===================================================================
RCS file: /cvs/src/src/gdb/disasm.c,v
retrieving revision 1.1
diff -u -r1.1 disasm.c
--- disasm.c	30 Sep 2002 15:57:25 -0000	1.1
+++ disasm.c	9 Jan 2003 18:27:50 -0000
@@ -66,7 +66,7 @@
 }
 
 static int
-compare_lines (const PTR mle1p, const PTR mle2p)
+compare_lines (const void *mle1p, const void *mle2p)
 {
   struct dis_line_entry *mle1, *mle2;
   int val;
Index: f-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/f-typeprint.c,v
retrieving revision 1.8
diff -u -r1.8 f-typeprint.c
--- f-typeprint.c	29 Jul 2002 22:55:26 -0000	1.8
+++ f-typeprint.c	9 Jan 2003 18:27:50 -0000
@@ -355,7 +355,7 @@
          through as TYPE_CODE_INT since dbxstclass.h is so
          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");
       else
 	goto default_case;
Index: gnu-v2-abi.c
===================================================================
RCS file: /cvs/src/src/gdb/gnu-v2-abi.c,v
retrieving revision 1.7
diff -u -r1.7 gnu-v2-abi.c
--- gnu-v2-abi.c	19 Aug 2002 22:53:33 -0000	1.7
+++ gnu-v2-abi.c	9 Jan 2003 18:27:50 -0000
@@ -329,8 +329,8 @@
 
   if (TYPE_NAME (basetype) != NULL
       && TYPE_NAME (TYPE_TARGET_TYPE (fieldtype)) != NULL
-      && STREQ (TYPE_NAME (basetype),
-		TYPE_NAME (TYPE_TARGET_TYPE (fieldtype))))
+      && strcmp (TYPE_NAME (basetype),
+		 TYPE_NAME (TYPE_TARGET_TYPE (fieldtype))) == 0)
     return 1;
   return 0;
 }
Index: inftarg.c
===================================================================
RCS file: /cvs/src/src/gdb/inftarg.c,v
retrieving revision 1.14
diff -u -r1.14 inftarg.c
--- inftarg.c	12 Dec 2002 01:39:34 -0000	1.14
+++ inftarg.c	9 Jan 2003 18:27:50 -0000
@@ -649,7 +649,8 @@
 #define PROC_NAME_FMT "/proc/%05d"
 #endif
   sprintf (procname, PROC_NAME_FMT, getpid ());
-  if ((fd = open (procname, O_RDONLY)) >= 0)
+  fd = open (procname, O_RDONLY);
+  if (fd >= 0)
     {
       close (fd);
       return;
Index: somsolib.c
===================================================================
RCS file: /cvs/src/src/gdb/somsolib.c,v
retrieving revision 1.20
diff -u -r1.20 somsolib.c
--- somsolib.c	3 Dec 2002 00:13:45 -0000	1.20
+++ somsolib.c	9 Jan 2003 18:27:50 -0000
@@ -418,7 +418,8 @@
   int threshold_warning_given = 0;
 
   /* 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);
     }
Index: somsolib.h
===================================================================
RCS file: /cvs/src/src/gdb/somsolib.h,v
retrieving revision 1.4
diff -u -r1.4 somsolib.h
--- somsolib.h	1 Nov 2001 16:17:08 -0000	1.4
+++ somsolib.h	9 Jan 2003 18:27:50 -0000
@@ -36,8 +36,8 @@
 
 extern CORE_ADDR som_solib_get_got_by_pc (CORE_ADDR);
 
-extern int
-som_solib_section_offsets (struct objfile *, struct section_offsets *);
+extern int som_solib_section_offsets (struct objfile *,
+				      struct section_offsets *);
 
 /* Function to be called when the inferior starts up, to discover the names
    of shared libraries that are dynamically linked, the base addresses to
Index: x86-64-linux-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/x86-64-linux-tdep.c,v
retrieving revision 1.15
diff -u -r1.15 x86-64-linux-tdep.c
--- x86-64-linux-tdep.c	8 Jan 2003 15:56:38 -0000	1.15
+++ x86-64-linux-tdep.c	9 Jan 2003 18:27:50 -0000
@@ -147,7 +147,7 @@
 x86_64_linux_in_sigtramp (CORE_ADDR pc, char *name)
 {
   if (name)
-    return STREQ ("__restore_rt", name);
+    return strcmp ("__restore_rt", name) == 0;
 
   return (x86_64_linux_sigtramp_start (pc) != 0);
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]