aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui/tui-win.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tui/tui-win.c')
-rw-r--r--gdb/tui/tui-win.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/gdb/tui/tui-win.c b/gdb/tui/tui-win.c
index 2477fa9..f49d7d5 100644
--- a/gdb/tui/tui-win.c
+++ b/gdb/tui/tui-win.c
@@ -1690,8 +1690,7 @@ parse_scrolling_args (char *arg,
/* Process the window name if one is specified. */
if (buf_ptr != (char *) NULL)
{
- char *wname;
- int i;
+ const char *wname;
if (*buf_ptr == ' ')
while (*(++buf_ptr) == ' ')
@@ -1699,11 +1698,11 @@ parse_scrolling_args (char *arg,
if (*buf_ptr != (char) 0)
{
- wname = buf_ptr;
-
/* Validate the window name. */
- for (i = 0; i < strlen (wname); i++)
- wname[i] = tolower (wname[i]);
+ for (char *p = buf_ptr; *p != '\0'; p++)
+ *p = tolower (*p);
+
+ wname = buf_ptr;
}
else
wname = "?";