Patchwork [RFA,6/6] Remove unnecessary cleanup from ada_collect_symbol_completion_matches

login
register
mail settings
Submitter Tom Tromey
Date Nov. 30, 2017, 3:01 a.m.
Message ID <20171130030140.14830-7-tom@tromey.com>
Download mbox | patch
Permalink /patch/24618/
State New
Headers show

Comments

Tom Tromey - Nov. 30, 2017, 3:01 a.m.
This removes an apparently unnecessary null cleanup from
ada_collect_symbol_completion_matches.  I believe the last cleanup was
removed from this function in b5ec77.

ChangeLog
2017-11-29  Tom Tromey  <tom@tromey.com>

	* ada-lang.c (ada_collect_symbol_completion_matches): Remove
	cleanup.
---
 gdb/ChangeLog  | 5 +++++
 gdb/ada-lang.c | 3 ---
 2 files changed, 5 insertions(+), 3 deletions(-)

Patch

diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index d222918362..014d2841f0 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -6434,7 +6434,6 @@  ada_collect_symbol_completion_matches (completion_tracker &tracker,
   const struct block *b, *surrounding_static_block = 0;
   int i;
   struct block_iterator iter;
-  struct cleanup *old_chain = make_cleanup (null_cleanup, NULL);
 
   gdb_assert (code == TYPE_CODE_UNDEF);
 
@@ -6522,8 +6521,6 @@  ada_collect_symbol_completion_matches (completion_tracker &tracker,
 				lookup_name, text, word);
     }
   }
-
-  do_cleanups (old_chain);
 }
 
                                 /* Field Access */