-Wwrite-strings: The Rest
[deliverable/binutils-gdb.git] / gdb / tui / tui-win.c
index 2477fa9090e6fe78b71be733475583ad0e85d78f..f49d7d5b87e0d090be54ce42bbf4622b19da8a76 100644 (file)
@@ -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 = "?";
This page took 0.024419 seconds and 4 git commands to generate.