optimize 17218 by using memmove instead of memcopy and not using _tcsncmp. Suggested...
authorBrandon Turner <turnerb7@msu.edu>
Sat, 20 Aug 2005 19:04:38 +0000 (19:04 +0000)
committerBrandon Turner <turnerb7@msu.edu>
Sat, 20 Aug 2005 19:04:38 +0000 (19:04 +0000)
svn path=/trunk/; revision=17452

reactos/subsys/system/cmd/cmd.c

index 91790e5..c2930c2 100644 (file)
@@ -341,8 +341,8 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest)
                /* remove any slashes */
                while(i < _tcslen(first))
                {
-                       if(!_tcsncmp (&first[i], _T("\""), 1))
-                               memcpy(&first[i],&first[i + 1], _tcslen(&first[i]));
+                       if(first[i] == _T('\"'))
+                               memmove(&first[i],&first[i + 1], _tcslen(&first[i]) * sizeof(TCHAR));
                        else
                                i++;
                }