diff --git a/gdb/ChangeLog b/gdb/ChangeLog index a05520fb7c..66ca520aad 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2018-04-12 Pedro Alves + + * procfs.c (procfs_detach): Make forward declaration's prototype + match definition's protototype. + (proc_get_LDT_entry): Remove stale do_cleanups call. + 2018-04-12 Pedro Alves * target.h (target_ops::to_has_exited): Delete. diff --git a/gdb/procfs.c b/gdb/procfs.c index 5ca7477fa5..3c747cd3e2 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -87,7 +87,7 @@ /* This module defines the GDB target vector and its methods. */ static void procfs_attach (struct target_ops *, const char *, int); -static void procfs_detach (struct target_ops *, const char *, int); +static void procfs_detach (struct target_ops *, inferior *, int); static void procfs_resume (struct target_ops *, ptid_t, int, enum gdb_signal); static void procfs_files_info (struct target_ops *); @@ -1620,10 +1620,7 @@ proc_get_LDT_entry (procinfo *pi, int key) break; /* end of table */ /* If key matches, return this entry. */ if (ldt_entry->sel == key) - { - do_cleanups (old_chain); - return ldt_entry; - } + return ldt_entry; } /* Loop ended, match not found. */ return NULL;