From 47cf603ed45d09dceda47b6da42a1d88a141ad82 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Mon, 15 May 2000 11:48:50 +0000 Subject: [PATCH] Cleanup cleanups - delete use of make_cleanup_func as cast. --- gdb/mi/ChangeLog-mi | 6 ++++++ gdb/mi/mi-cmd-var.c | 6 ++---- gdb/mi/mi-main.c | 4 ++-- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gdb/mi/ChangeLog-mi b/gdb/mi/ChangeLog-mi index 7aae9a9ad6a..d2eafae4f3d 100644 --- a/gdb/mi/ChangeLog-mi +++ b/gdb/mi/ChangeLog-mi @@ -1,3 +1,9 @@ +Mon May 15 16:17:56 2000 Andrew Cagney + + * mi-main.c (mi_cmd_data_assign, mi_cmd_data_evaluate_expression), + mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete): Delete + make_cleanup_func casts. Not needed. + 2000-05-07 Eli Zaretskii * gdbmi.texinfo: Lots of typos and grammar fixes from Brian diff --git a/gdb/mi/mi-cmd-var.c b/gdb/mi/mi-cmd-var.c index a20f4f1bbee..b2d6aaeb009 100644 --- a/gdb/mi/mi-cmd-var.c +++ b/gdb/mi/mi-cmd-var.c @@ -61,8 +61,7 @@ mi_cmd_var_create (char *command, char **argv, int argc) name = xstrdup (argv[0]); /* Add cleanup for name. Must be free_current_contents as name can be reallocated */ - old_cleanups = make_cleanup ((make_cleanup_func) free_current_contents, - &name); + old_cleanups = make_cleanup (free_current_contents, &name); frame = xstrdup (argv[1]); old_cleanups = make_cleanup (free, frame); @@ -128,8 +127,7 @@ mi_cmd_var_delete (char *command, char **argv, int argc) name = xstrdup (argv[0]); /* Add cleanup for name. Must be free_current_contents as name can be reallocated */ - old_cleanups = make_cleanup ((make_cleanup_func) free_current_contents, - &name); + old_cleanups = make_cleanup (free_current_contents, &name); /* If we have one single argument it cannot be '-c' or any string starting with '-'. */ diff --git a/gdb/mi/mi-main.c b/gdb/mi/mi-main.c index 3153da7e0d3..22745a07691 100644 --- a/gdb/mi/mi-main.c +++ b/gdb/mi/mi-main.c @@ -640,7 +640,7 @@ mi_cmd_data_assign (char *command, char **argv, int argc) 01-12-1999: Need to decide what to do with this for libgdb purposes. */ expr = parse_expression (argv[0]); - old_chain = make_cleanup ((make_cleanup_func) free_current_contents, &expr); + old_chain = make_cleanup (free_current_contents, &expr); evaluate_expression (expr); do_cleanups (old_chain); return MI_CMD_DONE; @@ -669,7 +669,7 @@ mi_cmd_data_evaluate_expression (char *command, char **argv, int argc) expr = parse_expression (argv[0]); - old_chain = make_cleanup ((make_cleanup_func) free_current_contents, &expr); + old_chain = make_cleanup (free_current_contents, &expr); val = evaluate_expression (expr); -- 2.30.2