From e65b52456bc3f60a176fece5e34e420c5a75bd16 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Mon, 31 Aug 2015 21:32:11 +0100 Subject: gdb/tui: Remove casts of NULL during assignment. In the following code: struct symbol *wsym = (struct symbol *) NULL; the cast of NULL is redundant, it adds noise, and is just one more thing to change if the type of wsym ever changes. There are a relatively small number of places in gdb where the above code pattern is used. Usually the cast is removed like this: struct symbol *wsym = NULL; This commit updates all the places within the gdb/tui directory where we cast NULL during assignment, removing the cast. gdb/ChangeLog: * tui/tui-data.c (win_with_focus): Remove cast of NULL pointer. (tui_next_win): Likewise. (tui_prev_win): Likewise. (tui_partial_win_by_name): Likewise. (tui_init_generic_part): Likewise. (init_content_element): Likewise. (tui_del_window): Likewise. (tui_free_window): Likewise. (tui_del_data_windows): Likewise. (tui_free_data_content): Likewise. * tui/tui-layout.c (make_source_or_disasm_window): Likewise. * tui/tui-regs.c (tui_show_register_group): Likewise. * tui/tui-win.c (tui_resize_all): Likewise. (tui_set_focus): Likewise. (tui_set_win_height): Likewise. (make_invisible_and_set_new_height): Likewise. * tui/tui-windata.c (tui_delete_data_content_windows): Likewise. * tui/tui-wingeneral.c (make_visible): Likewise. --- gdb/tui/tui-wingeneral.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/tui/tui-wingeneral.c') diff --git a/gdb/tui/tui-wingeneral.c b/gdb/tui/tui-wingeneral.c index b95da49..b6d3d0f 100644 --- a/gdb/tui/tui-wingeneral.c +++ b/gdb/tui/tui-wingeneral.c @@ -194,7 +194,7 @@ make_visible (struct tui_gen_win_info *win_info, int visible) { win_info->is_visible = FALSE; tui_delete_win (win_info->handle); - win_info->handle = (WINDOW *) NULL; + win_info->handle = NULL; } return; -- cgit v1.1