aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2017-10-08 16:19:48 -0600
committerTom Tromey <tom@tromey.com>2017-10-09 17:39:29 -0600
commit0c478e2d060bebea341696806fed6f67122efab6 (patch)
tree5424df43986f7a514e1b604dda0a3db587b4e514
parent478c006f9b4a64d59c31aed081c14c1d7dd4ba68 (diff)
downloadgdb-0c478e2d060bebea341696806fed6f67122efab6.zip
gdb-0c478e2d060bebea341696806fed6f67122efab6.tar.gz
gdb-0c478e2d060bebea341696806fed6f67122efab6.tar.bz2
Remove "do_nothing"
The do_nothing function in mi-main.c is used as a splay tree key-deleting function; but NULL serves the same purpose and is used elsewhere in gdb. This patch removes the unneeded function. ChangeLog 2017-10-09 Tom Tromey <tom@tromey.com> * mi/mi-main.c (do_nothing): Remove. (list_available_thread_groups): Update.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/mi/mi-main.c7
2 files changed, 6 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f1fd73c..ce21e25 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-09 Tom Tromey <tom@tromey.com>
+
+ * mi/mi-main.c (do_nothing): Remove.
+ (list_available_thread_groups): Update.
+
2017-10-09 Pedro Alves <palves@redhat.com>
* infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c
index 289445f..98fff4f 100644
--- a/gdb/mi/mi-main.c
+++ b/gdb/mi/mi-main.c
@@ -702,11 +702,6 @@ output_cores (struct ui_out *uiout, const char *field_name, const char *xcores)
}
static void
-do_nothing (splay_tree_key k)
-{
-}
-
-static void
free_vector_of_osdata_items (splay_tree_value xvalue)
{
VEC (osdata_item_s) *value = (VEC (osdata_item_s) *) xvalue;
@@ -756,7 +751,7 @@ list_available_thread_groups (const std::set<int> &ids, int recurse)
make_cleanup_osdata_free (threads);
tree = splay_tree_new (splay_tree_int_comparator,
- do_nothing,
+ NULL,
free_vector_of_osdata_items);
make_cleanup (free_splay_tree, tree);