mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-30 00:52:16 +08:00
Remove an unnecessary NULL check from the TUI
In init_and_make_win, opaque_win_info can't be NULL after a new window is allocated. This patch removes an unnecessary NULL check. gdb/ChangeLog 2019-06-25 Tom Tromey <tom@tromey.com> * tui/tui-layout.c (init_and_make_win): Remove NULL check.
This commit is contained in:
@ -1,3 +1,7 @@
|
|||||||
|
2019-06-25 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* tui/tui-layout.c (init_and_make_win): Remove NULL check.
|
||||||
|
|
||||||
2019-06-25 Tom Tromey <tom@tromey.com>
|
2019-06-25 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* tui/tui-data.h (struct tui_win_info): Make constructor
|
* tui/tui-data.h (struct tui_win_info): Make constructor
|
||||||
|
@ -842,8 +842,6 @@ init_and_make_win (void *opaque_win_info,
|
|||||||
else
|
else
|
||||||
generic = &((struct tui_win_info *) opaque_win_info)->generic;
|
generic = &((struct tui_win_info *) opaque_win_info)->generic;
|
||||||
|
|
||||||
if (opaque_win_info != NULL)
|
|
||||||
{
|
|
||||||
init_gen_win_info (generic, win_type, height, width, origin_x, origin_y);
|
init_gen_win_info (generic, win_type, height, width, origin_x, origin_y);
|
||||||
if (!tui_win_is_auxillary (win_type))
|
if (!tui_win_is_auxillary (win_type))
|
||||||
{
|
{
|
||||||
@ -853,7 +851,7 @@ init_and_make_win (void *opaque_win_info,
|
|||||||
((struct tui_win_info *) opaque_win_info)->can_highlight = TRUE;
|
((struct tui_win_info *) opaque_win_info)->can_highlight = TRUE;
|
||||||
}
|
}
|
||||||
tui_make_window (generic, box_it);
|
tui_make_window (generic, box_it);
|
||||||
}
|
|
||||||
return opaque_win_info;
|
return opaque_win_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user