diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-07-06 15:32:11 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2015-07-06 15:54:21 +0100 |
commit | f41cbf58f4af65e8612585c45208f3690a39ea28 (patch) | |
tree | 52092861f2d453e4a893cd3c3fe3992853a78bc5 /gdb/tui/tui-data.c | |
parent | 118ca22445afc728069ca80be2f30dae6913059e (diff) | |
download | binutils-f41cbf58f4af65e8612585c45208f3690a39ea28.zip binutils-f41cbf58f4af65e8612585c45208f3690a39ea28.tar.gz binutils-f41cbf58f4af65e8612585c45208f3690a39ea28.tar.bz2 |
gdb: tui_win_name: Make parameter and result const.
This commit makes the parameter and the result for 'tui_win_name'
constant. There's one place in the code that is then updated as a
result of this change.
gdb/ChangeLog:
* tui/tui-data.c (tui_partial_win_by_name): Window name is const.
(tui_win_name): Make parameter and result const.
* tui/tui-data.h (tui_win_name): Make parameter and result const.
Diffstat (limited to 'gdb/tui/tui-data.c')
-rw-r--r-- | gdb/tui/tui-data.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gdb/tui/tui-data.c b/gdb/tui/tui-data.c index ed42c8d..0c350d8 100644 --- a/gdb/tui/tui-data.c +++ b/gdb/tui/tui-data.c @@ -384,7 +384,8 @@ tui_partial_win_by_name (char *name) { if (tui_win_list[i] != 0) { - char *cur_name = tui_win_name (&tui_win_list[i]->generic); + const char *cur_name = + tui_win_name (&tui_win_list[i]->generic); if (strlen (name) <= strlen (cur_name) && startswith (cur_name, name)) @@ -399,8 +400,8 @@ tui_partial_win_by_name (char *name) /* Answer the name of the window. */ -char * -tui_win_name (struct tui_gen_win_info *win_info) +const char * +tui_win_name (const struct tui_gen_win_info *win_info) { char *name = (char *) NULL; |