This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[commit] Random cleanups
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 17 Jan 2003 14:13:43 -0500
- Subject: [commit] Random cleanups
This zaps a few random PTR and STREQ references.
committed,
Andrew
2003-01-17 Andrew Cagney <ac131313@redhat.com>
* main.c (captured_main): Don't use PTR.
* cp-valprint.c (cp_print_class_method): Replace STREQ with strcmp.
* gdbtypes.c (lookup_primitive_typename): Ditto.
(lookup_struct_elt_type): Ditto.
* f-valprint.c (info_common_command): Ditto.
(list_all_visible_commons): Ditto.
* jv-typeprint.c (java_type_print_base): Ditto.
Index: cp-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/cp-valprint.c,v
retrieving revision 1.16
diff -u -r1.16 cp-valprint.c
--- cp-valprint.c 11 Oct 2002 14:02:37 -0000 1.16
+++ cp-valprint.c 17 Jan 2003 19:10:20 -0000
@@ -130,7 +130,8 @@
check_stub_method_group (domain, i);
for (j = 0; j < len2; j++)
{
- if (STREQ (SYMBOL_NAME (sym), TYPE_FN_FIELD_PHYSNAME (f, j)))
+ if (strcmp (SYMBOL_NAME (sym), TYPE_FN_FIELD_PHYSNAME (f, j))
+ == 0)
goto common;
}
}
Index: f-valprint.c
===================================================================
RCS file: /cvs/src/src/gdb/f-valprint.c,v
retrieving revision 1.10
diff -u -r1.10 f-valprint.c
--- f-valprint.c 9 Dec 2002 03:30:44 -0000 1.10
+++ f-valprint.c 17 Jan 2003 19:10:20 -0000
@@ -562,7 +562,7 @@
while (tmp != NULL)
{
- if (STREQ (tmp->owning_function, funname))
+ if (strcmp (tmp->owning_function, funname) == 0)
printf_filtered ("%s\n", tmp->name);
tmp = tmp->next;
@@ -643,7 +643,7 @@
if (the_common)
{
- if (STREQ (comname, BLANK_COMMON_NAME_LOCAL))
+ if (strcmp (comname, BLANK_COMMON_NAME_LOCAL) == 0)
printf_filtered ("Contents of blank COMMON block:\n");
else
printf_filtered ("Contents of F77 COMMON block '%s':\n", comname);
Index: gdbtypes.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbtypes.c,v
retrieving revision 1.68
diff -u -r1.68 gdbtypes.c
--- gdbtypes.c 14 Jan 2003 00:15:05 -0000 1.68
+++ gdbtypes.c 17 Jan 2003 19:10:20 -0000
@@ -1021,7 +1021,7 @@
for (p = current_language->la_builtin_type_vector; *p != NULL; p++)
{
- if (STREQ (TYPE_NAME (**p), name))
+ if (strcmp (TYPE_NAME (**p), name) == 0)
{
return (**p);
}
@@ -1228,7 +1228,7 @@
char *typename;
typename = type_name_no_tag (type);
- if (typename != NULL && STREQ (typename, name))
+ if (typename != NULL && strcmp (typename, name) == 0)
return type;
}
#endif
Index: jv-typeprint.c
===================================================================
RCS file: /cvs/src/src/gdb/jv-typeprint.c,v
retrieving revision 1.6
diff -u -r1.6 jv-typeprint.c
--- jv-typeprint.c 12 Dec 2001 02:11:51 -0000 1.6
+++ jv-typeprint.c 17 Jan 2003 19:10:20 -0000
@@ -216,7 +216,7 @@
n_overloads = TYPE_FN_FIELDLIST_LENGTH (type, i);
method_name = TYPE_FN_FIELDLIST_NAME (type, i);
name = type_name_no_tag (type);
- is_constructor = name && STREQ (method_name, name);
+ is_constructor = name && strcmp (method_name, name) == 0;
for (j = 0; j < n_overloads; j++)
{
Index: main.c
===================================================================
RCS file: /cvs/src/src/gdb/main.c,v
retrieving revision 1.22
diff -u -r1.22 main.c
--- main.c 17 Jan 2003 16:56:50 -0000 1.22
+++ main.c 17 Jan 2003 19:10:24 -0000
@@ -173,7 +173,7 @@
#endif /* MPW */
/* This needs to happen before the first use of malloc. */
- init_malloc ((PTR) NULL);
+ init_malloc (NULL);
#if defined (ALIGN_STACK_ON_STARTUP)
i = (int) &count & 0x3;