optimize 17218 by using memmove instead of memcopy and not using _tcsncmp. Suggested by thomas. Modified: trunk/reactos/subsys/system/cmd/cmd.c _____
Modified: trunk/reactos/subsys/system/cmd/cmd.c --- trunk/reactos/subsys/system/cmd/cmd.c 2005-08-20 18:30:25 UTC (rev 17451) +++ trunk/reactos/subsys/system/cmd/cmd.c 2005-08-20 19:04:38 UTC (rev 17452) @@ -341,8 +341,8 @@
/* 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++; }