Remove unnecessary null_cleanup
authorTom Tromey <tom@tromey.com>
Sun, 25 Sep 2016 03:14:14 +0000 (21:14 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 13 Oct 2016 01:59:29 +0000 (19:59 -0600)
This patch removes an unnecessary null_cleanup.

2016-10-12  Tom Tromey  <tom@tromey.com>

* tracepoint.c (trace_dump_command): Remove unnecessary
null_cleanup.

gdb/ChangeLog
gdb/tracepoint.c

index 5d83d59db30021ac9b92f45d8c7bfa9038b835d6..aa3670d289ae9292c0a05e91d96497a17cee0e8f 100644 (file)
@@ -1,3 +1,8 @@
+2016-10-12  Tom Tromey  <tom@tromey.com>
+
+       * tracepoint.c (trace_dump_command): Remove unnecessary
+       null_cleanup.
+
 2016-10-12  Tom Tromey  <tom@tromey.com>
 
        * valprint.c (generic_emit_char, count_next_character)
index c89c77e2a06a7de81dcd1c8829cda3fcad0af139..e5c353c113911139f85346decf942e9dcb885eeb 100644 (file)
@@ -3061,11 +3061,9 @@ trace_dump_command (char *args, int from_tty)
   printf_filtered ("Data collected at tracepoint %d, trace frame %d:\n",
                   tracepoint_number, traceframe_number);
 
-  old_chain = make_cleanup (null_cleanup, NULL);
-
   /* This command only makes sense for the current frame, not the
      selected frame.  */
-  make_cleanup_restore_current_thread ();
+  old_chain = make_cleanup_restore_current_thread ();
   select_frame (get_current_frame ());
 
   actions = all_tracepoint_actions_and_cleanup (loc->owner);