From 7677f95c2cef39129923c05ba4ec83b9909b08b3 Mon Sep 17 00:00:00 2001 From: Brandon Turner Date: Sat, 20 Aug 2005 19:04:38 +0000 Subject: [PATCH] optimize 17218 by using memmove instead of memcopy and not using _tcsncmp. Suggested by thomas. svn path=/trunk/; revision=17452 --- reactos/subsys/system/cmd/cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactos/subsys/system/cmd/cmd.c b/reactos/subsys/system/cmd/cmd.c index 91790e5d008..c2930c22339 100644 --- a/reactos/subsys/system/cmd/cmd.c +++ b/reactos/subsys/system/cmd/cmd.c @@ -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++; }