]> sourceware.org Git - newlib-cygwin.git/commitdiff
cygwin: console: Use memset to clear an array
authorCorinna Vinschen <corinna@vinschen.de>
Mon, 31 Jul 2017 09:44:02 +0000 (11:44 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Mon, 31 Jul 2017 09:44:02 +0000 (11:44 +0200)
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/cygwin/fhandler_console.cc

index bf4366a65c51b961cd03bf9528b86b948d63688e..2a978e7468f9f62fc5247e1c292762ae027a73db 100644 (file)
@@ -2216,12 +2216,11 @@ fhandler_console::write (const void *vsrc, size_t len)
          if (*src == '[')              /* CSI Control Sequence Introducer */
            {
              con.state = gotsquare;
+             memset (con.args, 0, sizeof con.args);
+             con.nargs = 0;
              con.saw_question_mark = false;
              con.saw_greater_than_sign = false;
              con.saw_space = false;
-             for (con.nargs = 0; con.nargs < MAXARGS; con.nargs++)
-               con.args[con.nargs] = 0;
-             con.nargs = 0;
            }
          else if (*src == ']')         /* OSC Operating System Command */
            {
This page took 0.033769 seconds and 5 git commands to generate.