Author: turner Date: Tue Jun 13 04:26:08 2006 New Revision: 22334
URL: http://svn.reactos.ru/svn/reactos?rev=22334&view=rev Log: * When comparing two strings, you do not need to check what comes after them. * You do not need to look for the next space in the "command" to run on if success, that will be handled later on, and causes it to skip over to much if it done in both spots
Modified: trunk/reactos/base/shell/cmd/if.c
Modified: trunk/reactos/base/shell/cmd/if.c URL: http://svn.reactos.ru/svn/reactos/trunk/reactos/base/shell/cmd/if.c?rev=2233... ============================================================================== --- trunk/reactos/base/shell/cmd/if.c (original) +++ trunk/reactos/base/shell/cmd/if.c Tue Jun 13 04:26:08 2006 @@ -177,15 +177,13 @@ while (_istspace (*pp)) /* Skip subsequent spaces */ pp++;
- /* are the two sides equal, and does the second end in the same place? */ - if ( !_tcsncmp(param,pp,p1len) && _tcschr(_T(" ("),pp[p1len]) ) + /* are the two sides equal*/ + if ( !_tcsncmp(param,pp,p1len)) x_flag ^= X_EXEC; pp += p1len;
if ( x_flag ) { - while (*pp && !_istspace (*pp)) /* Find first space, */ - pp++; x_flag |= X_EMPTY; } }